Pelican is a static site generator that requires no database or server-side logic.
Pelican currently runs best on Python 2.7.x; earlier versions of Python are not supported. There is provisional support for Python 3.3+, although there may be rough edges, particularly with regards to optional 3rd-party components. However, it sure does work with 3.6.
$ sudo adduser pelican
$ sudo su - pelican
(pelican)$ mkvirtualenv --python="/usr/bin/python3" pelicanInstall Pelican requirements
(pelican)$ pip install pelican markdown(pelican)$ mkdir -p ~/projects/yoursite
(pelican)$ cd ~/projects/yoursite
(pelican)$ pelican-quickstartFollow the instructions.
(pelican)$ nano ~/projects/yoursite/content/my-first-content.mdTitle: My First Review
Date: 2010-12-03 10:20
Category: Review
Following is a review of my favorite mechanical keyboard.
From your site root dir (~/projects/yoursite)
(pelican)$ pelican content$ sudo apt install nginx
$ sudo touch /etc/nginx/sites-available/yoursite.comserver {
#listen [::]:80;
root /home/pelican/projects/yoursite/output;
index index.html index.htm index.nginx-debian.html;
server_name yoursite.com www.yoursite.com;
location / {
try_files $uri $uri/ =404;
}
}
Reload nginx and view your site.
$ sudo service nginx reload(pelican)$ cd ~/projects/yoursite/
(pelican)$ nano content/your-article.mdAdd your content in markdown syntax.
(pelican)$ pelican content
Done: Processed 3 articles, 0 drafts, 0 pages, 0 hidden pages and 0 draft pages in 0.50 seconds.Add the following to pelicanconf.py
CUSTOM_CSS = 'static/css/custom.css'
CUSTOM_JS = 'static/js/custom.js'
Create folders and files in ~/projects/yoursite/static.