[PYTHON] How to install Pelican blog

Introduction

Pelican is a static site generation blogging tool created by Python.

http://docs.getpelican.com

I think the best thing about Pelican is that it's implemented in 100% pure Python, but it's great that it's carefully crafted so that you can create content without stress. The name is also good. By the way, it is an anagram of "calepin" which means "notebook" in French.

Here, we will introduce the procedure from installing Pelican to quick start along the official website.

Install Pelican

Working version

Python 2.7.x is recommended for Pelican to work. It seems to work with Python 3.2 or higher, but let's be quiet and use the 2.7 series. In addition, the contents described here are all records when built on Mac OX 10.8.

Setting up virtualenv

Like many other Python tools, Pelican is recommended for use in virtual environments built with virtualenv. How to set up a development environment using virtualenv is explained in various places, so here we will assume that virtualenv (and virtualenvwrapper) can be used.

virtualenv Build a virtual environment pelican.

--_ If you want to specify the Python version, specify it with the --python = option _

$ mkvirtualenv pelican

Create a pelican directory for the pelican virtual environment under the user's home directory.

$ mkdir ~/pelican

Set the directory created above as the project directory for the virtualenv virtual environment.

$ cd ~/pelican
$ setvirtualenvproject

pelican installation

If you have a virtualenv environment, pip is already installed, so use pip to install it.

$ pip install pelican

If you want to blog with Markdown, you also need to have Markdown installed.

$ pip install Markdown

When installing Pelican, if the installation of the dependent module pytz fails, it seems that you need to install pytz separately below.

$ pip install --pre pytz

pytz requirement installation unsuccessful

This completes the Pelican installation.

quick start

pelican-quickstart

Once you have successfully installed Pelican, you can use the pelican-quickstart command to create a skeleton for your site.

$ pelican-quickstart

After this, you will be asked a few questions, and the answers will determine a simple setup for your site. However, all the settings decided here can be freely changed later, so you can decide it quickly.

> What will be the title of this web site? A Blog Written in Pelican
> Who will be the author of this web site? 5t111111
> What will be the default language of this web site? [en] ja
> Do you want to specify a URL prefix? e.g., http://example.com   (Y/n) Y
> What is your URL prefix? (see above example; no trailing slash) http://pelicanblog.jp
> Do you want to enable article pagination? (Y/n) Y
> How many articles per page do you want? [10] 10
> Do you want to generate a Makefile to easily manage your website? (Y/n) Y
> Do you want an auto-reload & simpleHTTP script to assist with theme and site development? (Y/n) Y
> Do you want to upload your website using FTP? (y/N) N
> Do you want to upload your website using SSH? (y/N) N
> Do you want to upload your website using Dropbox? (y/N) N
> Do you want to upload your website using S3? (y/N) N

After answering all the questions, a website skeleton will be generated.

Creating an article

First, let's create the first article. I'm writing an article in Markdown, so I'll give an example in Markdown here as well.

The article creates a draft file under the content directory. As an example, let's create a file called my-first-post.md. Edit content / my-first-post.md with your favorite editor.

Title:First Pelican blog
Date: 2013-09-17 22:58
Category: Pelican
Tags: pelican, python
Slug: my-first-post
Author: 5t111111
Summary:A summary of this article.

Hello Pelican
================================

Pelican
--------------------------------

###Penguins

This is the first article using Pelican.

After creating the file, let's use Makefile to generate an HTML file.

$ make html

HTML is generated under output. Next, let's start a simpleHTTP server to check the article.

$ make serve

After the server starts, try connecting to http: // localhost: 8000 in your web browser. If all goes well, you should see the blog you created.

That's the first step in building a blog on Pelican.

Recommended Posts

How to install Pelican blog
How to install Python
How to install pip
How to install archlinux
How to install python
How to install BayesOpt
How to install Nbextensions
How to install Prover9
[2020.8 latest] How to install Python
How to install Python [Windows]
Tabpy 1.0 (2020-01 version) How to install
How to install mkl numpy
Added Theme to Pelican Blog
How to install python using anaconda
How to install mysql-connector-python on mac
How to install and use Tesseract-OCR
How to install graph-tool on macOS
How to install wkhtmltopdf (Amazon Linux2)
How to install VMware-Tools on Linux
How to install pycrypto on Windows
How to install OpenCV on Mac
How to install PyPy on CentOS
How to install TensorFlow on CentOS 7
How to install and configure blackbird
How to install CUDA and nvidia-driver
How to install and use Graphviz
How to install mysql-connector with pip3
How to install Maven on CentOS
How to install Go on Ubuntu
How to install music 21 on windows
How to install Anaconda with pyenv
How to install aws-session-manager-plugin on Manajro Linux
How to install drobertadams / toggl-cli on Mac
python3 How to install an external module
[Kivy] How to install Kivy on Windows [Python]
How to install DLIB with 2020 / CUDA enabled
How to install a package using a repository
How to install packages on Alpine Linux
How to install Anisble on Amazon Linux 2
How to install richzhang / colorization on Windows 10
How to install your own (root) CA
How to install Windows Subsystem For Linux
How to install Apache (httpd) on CentOS7
How to install php7.4 on Linux (Ubuntu)
How to install Eclipse GlassFish 5.1.0 on CentOS 7
How to install Apache (httpd) on CentOS8
How to make a Pelican site map
How to install zsh (with .zshrc customization)
How to install NumPy on Raspberry Pi
How to install fabric and basic usage
How to install cx_Oracle on macOS Sierra
How to install python3 with docker centos
How to install OpenCV on Jetson Nano Python
How to install pip, numpy in Autodesk MAYA
How to install Python for pharmaceutical company researchers
How to quickly install h5py on Windows 10 [Unofficial]
How to install OpenGM on OSX with macports
How to install Camunda Modeler on Manjaro Linux
[Python] How to install OpenCV on Anaconda [Windows]
How to install Cascade detector and how to use it
How to install / verify graphviz on anaconda / windows10