Just like Jekyll and Hugo, Pelican is another Static Site Generator. As Jekyll is build on Ruby and Hugo on GO, Pelican is build on Python. Therefore, if you know Python, this should be the most appropriate for you.
In order to install Pelican in CentOS, you will need to have Python 2.7.x or 3.x.x installed on your system. CentOS 7 comes with Python 2.7.5 installed and I will use this one for my Pelican environment.
First you will have to install
Python Pip with the command:
Next, you will need to install
virtualenv for Python, with the command:
And then you will have to setup an virtual environment for Pelican:
Now you can install
pelican using the command:
Next, if you like to write your content in Markdown, you will need to install the extra package for Python using the command:
As an option, you can upgrade
pip to the latest version:
To start a first Pelican project, you will need to run
pelican-quickstart while you are in the local environment you set up earlier.
Now you will have to respond to all the questions the setup process will ask you. I will leave the default answers to all, except the ones that ask you about the website name, the owner name and the url.
Now you can create content using Markdown (this is what I prefer) and save the files in the
/content directory inside your environment directory created at the beginning. Save the files using the
.markdown extension and then run the following command while still inside the content directory:
Now move to the
/output directory and run the pelican server using the command:
(for Python 2)
(and for Python 3)
To test your content and site, open a browser and go to the address
This is it. Enjoy creating your static website. To deploy your website, you will need to copy your
/output directory to the webserver through SSH.
That’s it! Enjoy!