With Pelican installed and configured the final couple of tasks are sorting out the design and posting content to your site. Thankfully Pelican makes both of these really easy. Themes are handled by the excellent Pelican Themes git repository and submitting content is as simple as write, build and push. Write a post in Markdown. Tell pelican to build your site, and then push it to your web server.
The design of your blog is handled by themeing. The Pelican Themes repository contains some excellent designs but Pelican makes it very easy to build your own if you have flair for website design. You will have to learn some Jinja but it will be well worth it. If you are like me and can write some CSS and HTML but lack any real knowledge of web layouts, then there are many superb themes that are just a config variable away. Clone the Pelican Themes repository into your website directory and set this variable in your pelicanconfig.py to the relevant directory name.
# Sets the theme
THEME = "/home/joe/JPoser/pelican-themes/pelican-bootstrap3"
And that's it. Big thanks to DandyDev and of course the Twitter devs for the excellent pelican-bootstrap3 Theme and Bootstrap framework respectively. I think it looks excellent and works brilliantly on mobile as well as desktop. I particularly like the social menu.
Now that's done it's time to create some content. Open up the text editor of your choice and create a file with a .md extentsion to make a Markdown file. Meta data is handled with the following tags:
Title: How Pelican: Part 2
Date: 2014-04-01 21:28
Category: Blog
Tags: Pelican, Blogging, Python
Slug: How Pelican 2
Author: Joe Poser
Summary:
Markdown has a really easy to use syntax which you can mug up on from this excellent cheat sheet. It makes writing posts a joy.
Now it's time to generate the site! Place your post file into the content directory, navigate to the Pelican installation in the command line and run:
make build
This will generate the site. You can test how it looks by running
make serve
and navigating to localhost:8000 in your browser. Finally when your happy with how it looks run
make rsync_uplaod
And thats it! Now you've just got to write some good content. Like about how you set up a Pelican site...
In news about me, I'm currently in the middle of mucking about with some electronic projects. I'll post what I've done so far when I've got to something interesting. I've also set my sites on a bigger project. I'm going to attempt to build a quadcopter. More on this soon.
Comments
comments powered by Disqus