Date Tags Pelican

Why the site needed a change

The previous iteration of this site had been around for much too long and I actually created it back when I was first learning the basics of HTML, CSS, and responsive web design. As you can imagine the site was kind of a tangled mess of redesigned code and a lot of quick-fix inline CSS (yikes!).

When I was deciding what kind of site to go with there were a lot of options I could have chosen from. I thought about installing another WordPress site on my VPS but decided against it in the end. I like WordPress and it allows you to do a lot of things out of the box. However, I don't know a lot about PHP right now so WordPress would not have been as customizable for me.

In the end I decided to go with something light, simple, built with a language that I am familiar with. That's why I chose Python's Pelican static site generator!

What is Pelican?

Writing websites in only HTML and CSS is great because it is incredibly fast. The problem you run into rather quickly is how to manage all the duplicate code you are writing for the title, header, and footer on each new page you create. What if you need to change the header of your website and add a nice logo? With only static HTML and CSS you would have to manually change it on each one of your HTML files.

Static site generators like Pelican help you manage these problems by regenerating your HTML files for you whenever you make a change. Pelican also makes it a lot easier to manage your content by using the popular Python templating engine Jinja. Jinja simply makes it possible for you to write an HTML file and include things like variables, loops, and control structures within it. Then when you run the Python Pelican command Python will render the html and css files using your templates to create the proper structures.

Why pelican-bootstrap3?

The theme I decided to go with for this website is the pelican-bootstrap3 theme.

If you are not familiar with Bootstrap it is a popular front-end framework that makes it much easier to quickly throw together a polished site. Interestingly enough, it was created by the folks at Twitter.

If you are not a big fan of CSS (and really, who is?), bootstrap includes a ton of built in classes that enable you to turn on and off different CSS behaviors by simply changing a class.

The great thing about pelican-bootstrap3 is that is supports the Bootswatch Bootstrap themes!


Comments

comments powered by Disqus