@@ -12,13 +12,17 @@ It's a pythonic tool that's easy to use and was a breeze to setup.
...
@@ -12,13 +12,17 @@ It's a pythonic tool that's easy to use and was a breeze to setup.
Installing Pelican
Installing Pelican
------------------
------------------
As Pelican is a static blog/ website generator, all we're doing is in your workstation. All you need to have server-wise is a bog-standard web server (like Apache or Nginx). Everything else is done on your local machine. I installed Pelican from Debian (it's currently available in testing) ::
As Pelican is a static blog/ website generator, all we're doing is in your workstation. All you need to have server-wise is a bog-standard web server (like Apache or Nginx). Everything else is done on your local machine. I installed Pelican from Debian (it's currently available in testing)
$ apt-get install python-pelican fabric
.. code:: shell
Alternatively, you can use pip ::
apt-get install python-pelican fabric
$ pip install pelican fabric
Alternatively, you can use pip
.. code:: shell
pip install pelican fabric
Creating a blog
Creating a blog
---------------
---------------
...
@@ -81,9 +85,11 @@ I've set the timezone to mine (so that the time of published articles is correct
...
@@ -81,9 +85,11 @@ I've set the timezone to mine (so that the time of published articles is correct
Themes
Themes
------
------
Pelican comes with a default theme (the same as used by Pelican's website) but I wanted something more understated so I took at look at `https://github.com/getpelican/pelican-themes <https://github.com/getpelican/pelican-themes>`_ and chose pelican-mockingbird. Cloned it ::
Pelican comes with a default theme (the same as used by Pelican's website) but I wanted something more understated so I took at look at `https://github.com/getpelican/pelican-themes <https://github.com/getpelican/pelican-themes>`_ and chose pelican-mockingbird. Cloned it
and set the theme to that by adding the following to pelicanconf.py: ::
and set the theme to that by adding the following to pelicanconf.py: ::
...
@@ -101,9 +107,11 @@ Create a ReStructedText file inside of contents. The filename is for personal us
...
@@ -101,9 +107,11 @@ Create a ReStructedText file inside of contents. The filename is for personal us
:author: <Insert your name here>
:author: <Insert your name here>
:summary: <Insert summary here>
:summary: <Insert summary here>
After we added the content we want to upload it to our web server (I use fabric) ::
After we added the content we want to upload it to our web server (I use fabric)
.. code:: shell
$ fab publish
fab publish
If you don't have keys set for the server it will ask you for your password to the server.
If you don't have keys set for the server it will ask you for your password to the server.
Last thing, you can create pages, create a pages directory inside contents and save the files there. Their format is the same as articles but they'll have a somewhat template applied and they will be shown in the menu. A good example will an 'About Me' page.
Last thing, you can create pages, create a pages directory inside contents and save the files there. Their format is the same as articles but they'll have a somewhat template applied and they will be shown in the menu. A good example will an 'About Me' page.