Today's Deep-Dive: Pelican
Ep. 226

Today's Deep-Dive: Pelican

Episode description

This episode discusses Pelican, a Python-based static site generator that simplifies web publishing. It transforms text files written in formats like Markdown into a complete website, eliminating the need for complex databases or server-side code. Pelican offers features such as content freedom, automated generation, easy hosting, and version control compatibility. Additional functionalities include multilingual support, RSS feeds, code syntax highlighting, and content importation from platforms like WordPress. The tool is designed to be accessible, with a quick start guide and a supportive community, making it ideal for beginners and those looking to create blogs or portfolios.

Gain digital sovereignty now and save costs

Let’s have a look at your digital challenges together. What tools are you currently using? Are your processes optimal? How is the state of backups and security updates?

Digital Souvereignty is easily achived with Open Source software (which usually cost way less, too). Our division Safeserver offers hosting, operation and maintenance for countless Free and Open Source tools.

Try it now for 1 Euro - 30 days free!

Download transcript (.srt)
0:00

Before we dive in, just a quick word about our supporter for this Deep Dive, Safe

0:03

Server.

0:04

They manage the hosting for this software, and they're ready to support you with

0:08

your

0:08

digital transformation too.

0:09

You can find more info at www.safeserver.dst.

0:16

Welcome back to the Deep Dive.

0:18

Today we're looking at the sources you sent over, and we're going to peel back the

0:21

layers

0:21

on something called static site generators.

0:24

Sounds maybe a bit technical.

0:25

Yeah, it can sound that way at first.

0:27

But honestly, for your projects, it could be this really empowering shortcut to

0:30

getting

0:31

your ideas online.

0:33

So our mission here is to give you a clear, straightforward understanding,

0:37

especially

0:37

if you're kind of new to this and just want a simpler way to publish stuff.

0:41

Exactly.

0:42

And we're zoning in on one specific tool today, a Python-based one called Pelican.

0:47

That's the plan.

0:48

So for this Deep Dive, we've really dug into the key info from two main places, the

0:53

official

0:53

Pelican website itself, and also its GitHub repository.

0:57

And these give us a really good picture of what Pelican is, how it actually works,

1:02

and

1:02

importantly, what you can do with it.

1:03

We want to be sure you leave this with a really clear sense of why this might be a

1:07

great option

1:08

for your own website or project.

1:10

Okay, sounds good.

1:11

Let's unpack this then.

1:12

So many of you listening probably have a sense of how lots of websites work, right?

1:17

They often have these complex databases running in the background.

1:22

Definitely fetching data.

1:23

Yeah, talking to servers that are running pretty intricate code.

1:27

It's almost like imagine a busy restaurant kitchen, right?

1:32

Every dish made fresh to order, ingredients pulled from this huge pantry.

1:36

It's powerful, sure.

1:38

Definitely powerful for dynamic stuff, yeah.

1:40

But it can also be quite daunting to manage.

1:42

You need server knowledge, constant updates, security worries.

1:46

It feels like you need to be a top chef just to make a simple sandwich sometimes.

1:50

That's a good analogy.

1:51

So for sites that are mostly about content, like a blog maybe or a portfolio, what

1:56

if

1:56

there was just a simpler way?

1:57

What if you didn't meet all the database stuff or complex server programming?

2:01

And what's really interesting is there is a fundamentally simpler way.

2:04

And Pelikan, well, it's a perfect example of that whole philosophy is what's known

2:08

as

2:08

a static site generator.

2:10

And it's written in Python.

2:12

Its main job is actually brilliantly straightforward.

2:15

Instead of that dynamic kitchen, you basically pre-bake everything.

2:20

Oh, OK.

2:21

You write your website content using simple text files formats like Markdown or

2:25

maybe restructured

2:26

text.

2:27

Think of them as just, you know, enhanced text documents, easy to write in any

2:30

editor.

2:31

Right.

2:32

I use Markdown sometimes.

2:33

It's pretty clean.

2:34

Exactly.

2:35

Then Pelikan takes those text files and just transforms them into a complete ready-to-go

2:40

website.

2:41

HTML, CSS, JavaScript files, all static.

2:44

Static meaning no processing needed on the server when someone visits it.

2:48

Precisely.

2:49

No static code running.

2:50

No database lookups for that page view.

2:52

The files are just served as they are.

2:54

And the insight here is how that simplicity makes the site inherently more secure,

2:58

much

2:58

faster and honestly cheaper to host and maintain.

3:02

Right.

3:03

Because there's less to go wrong, less to manage.

3:04

Exactly.

3:05

It's a different way of thinking about web architecture, especially for content-heavy

3:09

sites.

3:10

That does shift the perspective.

3:11

So the real sort of magic is turning that simple text into these static files.

3:17

HTML, CSS, JavaScript.

3:19

Does that mean hosting gets really easy compared to a typical WordPress site or

3:24

something?

3:25

Oh, absolutely.

3:26

Almost trivial sometimes.

3:27

I remember spending a whole weekend one time debugging some rogue plugin that

3:31

crashed my

3:31

simple blog.

3:32

Honestly, if I'd known about tools like Pelican back then, it could have saved a

3:37

lot of hassle.

3:38

We've all been there, I think.

3:39

So what does the simplicity mean for you listening right now when you just want to

3:43

get your stuff

3:44

out there?

3:45

It really means less fuss, right?

3:47

Less server admin headache and just an easier path to getting published.

3:51

And if we look at Pelican's core features, they're all built around this idea.

3:54

First, you get what we could call content freedom.

3:57

Okay.

3:58

Write in your favorite editor, use markdown or restructure text.

4:01

They're easy to learn, widely used.

4:03

Second, automated generation.

4:05

A simple command you run and poof, it rebuilds your site from your text files when

4:08

things

4:09

change.

4:10

Like hitting compile almost.

4:11

Sort of, yeah.

4:12

But for your website, third, and this is key, easy hosting.

4:16

Because the output is just plain static files, HTML, CSS, JS, you'd host it

4:21

literally anywhere.

4:23

Any basic web server cloud stores like S3, Netlify, GitHub pages, anywhere they can

4:28

serve

4:29

files.

4:30

No special PHP or Python hosting needed?

4:32

Nope, not at all.

4:33

Yeah.

4:34

Just needs to serve files.

4:35

And finally, because it is all just files, it's naturally version control ready.

4:38

Easy to use with Git, track changes, collaborate, Pelican's own code is on GitHub,

4:43

so it fits

4:43

right into that workflow.

4:44

That version control aspect is huge, especially if you're working with others or

4:47

just want

4:48

a safety net.

4:49

OK.

4:50

So that's the solid foundation.

4:51

Simple, efficient.

4:52

But, you know, often the things that make you really choose a tool are the extra

4:55

bits,

4:56

the sort of wow factors.

4:57

Does Pelican have things like that beyond just the basic text to HTML?

5:02

That's a fair question.

5:03

And yeah, it does pack quite a few punches beyond the basics.

5:06

For instance, it handles both chronological content, your typical blog posts or

5:10

articles

5:11

ordered by date, and also static pages like an about page or a contact page.

5:15

Really smoothly.

5:16

Ah, good.

5:17

So it's not just for blogs.

5:18

Not at all.

5:19

And for how it looks.

5:21

It uses site themes built with Jinja 2 templates.

5:25

Jinja is a pretty popular templating engine in the Python world.

5:27

Right.

5:28

So that gives you a ton of flexibility to customize the appearance without digging

5:32

into Pelican's

5:33

core code.

5:34

You can really make it look unique.

5:36

Nice.

5:37

What about reaching a wider audience?

5:39

Well, it has built-in support for publishing articles in multiple languages.

5:43

Which is quite neat.

5:45

It handles the structure needed to serve, say, an English and a Spanish version of

5:48

your

5:49

site.

5:50

Oh wow.

5:51

That's actually a big deal for some projects.

5:52

It really can be.

5:53

It also automatically generates Atom and RSS feeds.

5:57

These are those feeds people can subscribe to in feed readers so they get notified

6:00

about

6:00

your new posts automatically.

6:02

Great for building loyal readership.

6:04

Essential for blogs, yeah.

6:05

And if you're writing about tech, it has code syntax highlighting using a library

6:10

called

6:10

Pigments.

6:12

Makes code snippets in your articles look really clean and readable.

6:15

Oh, that's crucial for technical blogs or documentation, definitely.

6:19

And another big one, if you're maybe thinking of switching from something else, Pelikan

6:24

can actually import existing content from platforms like WordPress, DotClear, or

6:29

even

6:30

just from RSS feeds.

6:31

Seriously, that could save hours of manual work.

6:34

It's a huge help for migration, yeah.

6:36

And performance-wise, it focuses on fast rebuild times.

6:38

It uses caching and only writes out files that have actually changed.

6:42

So regenerating the site, even with lots of content, stays pretty quick.

6:46

Smart.

6:47

Doesn't rebuild everything every single time.

6:49

Exactly.

6:50

And lastly, if there's something specific you need that isn't built in, there's a

6:53

really

6:54

rich plugin ecosystem.

6:56

Lots of community-contributed plugins to add features.

6:59

Or you can write your own if you're comfortable with Python.

7:01

Wow.

7:02

This list is genuinely impressive.

7:04

It starts simple, but there's clearly a lot of power under the hood.

7:08

The multi-language support, the importer, those are really practical wins.

7:12

They really are.

7:13

And I actually stumbled on a little fun fact about the name, speaking of neat

7:16

things.

7:17

Apparently, Pelican is an anagram.

7:19

Of what?

7:20

Of a calipin.

7:21

It's a French word for a small notebook.

7:24

Huh.

7:25

That's clever.

7:26

A little nod to organizing your notes into a site.

7:28

I like that.

7:29

Yeah, me too.

7:30

All right, so we've established Pelican is powerful, versatile, sounds great.

7:35

But the big question for a lot of listeners, especially the beginners we're

7:38

thinking about

7:38

today is, can I actually use this?

7:42

How easy is it to get started if you're maybe not super technical?

7:46

That's the crucial question, isn't it?

7:48

And the answer is, it's designed to be pretty accessible.

7:51

The official quick start guide really aims to get you going quickly, even if maybe

7:55

you

7:56

haven't used the command line much before.

7:58

Okay, let's hear it.

7:59

Let's talk us through it.

8:00

Imagine I'm, say, a student wanting a simple portfolio or someone starting a hobby

8:05

blog.

8:06

How do I go from zero to seeing something?

8:08

Right.

8:09

So step one is installation.

8:10

Assuming you have Python on your computer, which many systems do, or it's easy to

8:14

install,

8:14

you just open your terminal or command prompt.

8:16

Okay.

8:17

That black window thing?

8:18

Yep.

8:19

You type this command, python-m pip install pelican markdown.

8:23

You hit enter.

8:24

Pip is Python's package installer.

8:27

This usually takes less than a minute, and it downloads and installs Pelican and

8:32

the

8:32

bits needed for markdown.

8:33

Okay.

8:34

Pip install pelican markdown.

8:35

Got it.

8:36

Step two, you create your project.

8:37

So you make a new folder somewhere for your website, let's call it MyAwesomeSite.

8:41

You navigate into that folder in your terminal.

8:44

Using CD probably?

8:45

Exactly.

8:46

Using CD MyAwesomeSite.

8:47

Then right there, you type pelican quickstart and hit enter.

8:51

Pelican quickstart.

8:52

Okay.

8:53

This command starts a little interactive questionnaire that'll ask you things like,

8:55

what's the title

8:56

of your site?

8:57

What's the author?

8:58

And importantly, what's the main URL going to be?

9:00

Like https.my-awesome-site.com or whatever.

9:05

You just answer the questions.

9:06

And it sets up the folders and basic files for me.

9:08

Precisely.

9:09

Creates the basic structure, like a content folder for your articles, an output

9:12

folder

9:13

for the generated site, a settings file, all ready to go.

9:16

Okay.

9:17

Structures there.

9:18

Now, the actual content.

9:19

Step three.

9:21

Write your first article.

9:22

You just open.

9:23

The text editor could be notepad, VS code, supplying text, anything.

9:27

You create a new file inside that content folder it made.

9:30

Let's call it firstpost.md.

9:32

The MD is for Markdown.

9:33

Right.

9:34

Inside that file, you put a few lines at the very top for metadata.

9:38

Like my first post, 20, 23, 10, 27, 0.00.

9:43

Scalica.

9:44

Musings.

9:45

Then just below that, you start writing your actual article content using Markdown

9:49

formatting.

9:49

You know, like this is my first post using Pelican.

9:52

That's pretty cool.

9:53

Simple enough.

9:54

Title, date, category, then the text.

9:55

Exactly.

9:56

And step four, the payoff.

9:57

Preview your site.

9:59

You go back to your terminal.

10:00

Make sure you're still in your main project folder.

10:02

My awesome site.

10:03

And you type Pelican Nessure RL.

10:05

Pelican Nessure RL.

10:06

What does the RRN do?

10:08

Good question.

10:09

That R tells Pelican to keep running and automatically regenerate the site if you

10:12

change any content

10:13

files.

10:14

And Desk tells it to launch a simple local web server so you can view the site.

10:17

Ah.

10:18

Handy.

10:19

So it builds it and serves it locally.

10:20

Yep.

10:21

So it builds the site into the output folder and then usually say something like,

10:24

serving

10:24

site at http.localhost.800.

10:28

You just open your regular web browser, go to that address.

10:31

And I should see my site.

10:33

With my first post.

10:34

You should see your brand new site using the default theme initially with my first

10:38

post

10:38

right there.

10:39

It's usually a real aha moment.

10:41

OK.

10:42

Those four steps, install, quick start, write a file, preview.

10:47

That does sound genuinely manageable.

10:49

It really lowers the barrier to just getting something up and running quickly,

10:52

which is

10:53

fantastic for learning and experimenting.

10:55

That's the whole idea.

10:56

Get you focused on content quickly.

10:57

Now, if someone does run into a little snag or wants to go beyond that basic setup,

11:02

where

11:02

does the community aspect come in?

11:04

You mentioned it's open source.

11:05

Right.

11:06

And that's a huge strength.

11:07

Pelican is fundamentally an open source project.

11:09

It lives on GitHub and it's pretty active looking at the stats.

11:13

It has over 13,000 stars, about 1800 forks.

11:17

That's quite a lot.

11:18

That indicates a healthy user base.

11:20

Definitely.

11:21

It means people are using it, interested in it, contributing to it.

11:24

So for you as a user, that means the code is well tested and there's a community

11:27

around

11:27

it.

11:28

If you hit a problem, chances are someone else has too.

11:31

And there might be a solution on an issue tracker or forum.

11:34

And the license.

11:35

It's licensed under the AGPL 3.0.

11:38

That's a strong copy left license, ensuring it stays free and open source.

11:42

And if you peek under the hood, it's mostly Python, about 89%, then some CSS and

11:47

ginger

11:48

for templating.

11:49

Okay.

11:50

So a strong open source foundation.

11:52

If our listeners are thinking, okay, I want to try this or maybe even, hey, I could

11:56

help

11:57

out.

11:58

What are the best places to go for help or to get involved?

12:01

Great question.

12:02

There are several avenues.

12:03

First stop for almost any question should be the official Pelican documentation.

12:07

It's really comprehensive, well written, covers everything from the basics right up

12:12

to advanced

12:13

customization and plugin development.

12:14

Always good to have solid docs.

12:16

Absolutely essential.

12:17

Then if you want to actually contribute back, you can do that on GitHub.

12:22

You could submit pull requests if you find a bug and fix it, or if you add a new

12:25

feature.

12:26

You could help triage issues that other people report, confirming bugs, asking for

12:31

more info,

12:32

or a really valuable way to help is by improving the documentation itself.

12:37

Clearer docs help everyone.

12:39

That's often overlooked, but yeah, it's so important.

12:41

If you just want to support the project financially, keep the development going,

12:45

you can donate

12:45

to the Pelican dev team, they have links on their site, like donate.getpelican.com,

12:50

or

12:50

they're on platforms like LibrePay.

12:53

Every little bit helps maintain and improve the tool.

12:56

And we should also mention, one of the project's key supporters is Fortressa

12:59

companies sponsoring

13:00

open source like this makes a real difference.

13:02

Definitely good to acknowledge the supporters.

13:04

Okay, so wrapping things up a bit, we've taken this deep dive into Pelican.

13:08

It's a static site generator written in Python.

13:12

The big takeaway seems to be how it simplifies getting a website online.

13:16

You write in simple text files.

13:18

Like Markdown.

13:19

Right.

13:20

Like Markdown.

13:21

Pelican turns them into a full HTML website.

13:23

No complex database needed on the live site.

13:26

No tricky server-side code just to display your content.

13:29

It feels really accessible, powerful too, especially if you're starting out and

13:33

want

13:33

a blog or a portfolio without the usual backend headaches.

13:37

Yeah.

13:38

It puts the power back in your hands, focusing you on the content.

13:41

What's really fascinating to me here is just that core idea of static generation

13:45

itself.

13:46

How tools like Pelican strip away all those layers of complexity we often associate

13:50

with

13:50

websites.

13:51

Exactly.

13:52

It makes things simpler, faster, more secure in many cases.

13:55

It really lowers the barrier for anyone who just wants to publish something online.

13:59

It makes a solid web presence feel much more achievable, regardless of how

14:03

technical you

14:04

are.

14:05

It's quite empowering.

14:06

It really is.

14:07

And that leads to maybe a final thought for you, the listener.

14:11

Now that you know how accessible static site generation can be with tools like Pelican,

14:16

what new possibilities does that open up?

14:18

Is it that blog you've been meaning to start?

14:20

A simple site for a side project?

14:22

Maybe documentation for something you're building?

14:24

The tools are there?

14:25

And maybe simpler than you thought.

14:27

And before we go, once again, a huge thank you to our supporter, SafeServer.

14:31

them out at www.SafeServer.de.

14:31

them out at www.SafeServer.de.