Setting up Pelican

By 0x7df, Mon 26 September 2016, modified Mon 26 September 2016, in category Programming

linux, markdown, pelican, programming, publishing, python

  1. Install pelican and its prerequisites:

    pip install markdown
    pip install pelican
    
  2. Clone the "nest" theme somewhere:

    cd ~/Perm/Pelican
    git clone https://github.com/molivier/nest.git
    
  3. Install the "nest" theme:

    pelican-themes --install ~/Perm/Pelican/nest --verbose
    
  4. Install the "render_math" plugin and its prerequisites:

    pip install typogrify
    pip install beautifulsoup4
    cd ~/Perm/Pelican
    git clone --recursive https://github.com/getpelican/pelican-plugins
    
  5. Add the location of the "render_math" plugin to the settings file. Ensure the following lines are in the "pelicanconf.py" file:

    PLUGIN_PATHS = ["/full/path/to/Perm/Pelican/pelican-plugins"]
    PLUGINS = ["render_math"]
    

    (Note that on a Mac OS X system, "~/Perm/Pelican..." didn't work.)

  6. Clone the site repository:

    cd ~/Code
    git clone https://github.com/0x7df/0x7df.github.io.git
    
  7. Enter the repository:

    cd 0x7df.github.io
    
  8. Switch to the "source" branch (never use the "master" branch, as it is purely derivative and gets over-written whenever the static site is built from source):

    git checkout source
    
  9. Build locally:

    make html
    
  10. View local build:

    cd output
    python -m SimpleHTTPServer
    

    and go to http://localhost:8000.

  11. Install ghp-import:

    git clone https://github.com/davisp/ghp-import.git
    
  12. Publish to GitHub:

    make github
    

Comments

Add comment