How to Develope
Development Tool: pelican (static site generator written in Python)
Development Environment: Ubuntu 14.10
First-time Setup
- Install git, pip, and virtualenv:
$ sudo apt-get install git
$ sudo apt-get install python-pip
$ sudo pip install virtualenv
- Create and enter Python virtual environment: This step is optional, if you
get error messages like
No module named scss
when you runmake
command, DO NOT use virtual Python environment and ignore this step.
$ cd
$ mkdir dev
$ virtualenv ~/dev/
$ cd ~/dev/
$ source bin/activate
- git clone source code:
$ cd ~/dev/
$ git clone https://github.com/siongui/userpages.git
- Install Python tools:
$ cd ~/dev/userpages/
$ sudo pip install -r requirements.txt
- Install pelican i18n_subsites plugin and download normalize.css:
$ cd ~/dev/userpages/
$ make download
- Generate CSS file:
$ cd ~/dev/userpages/
$ make scss
If you get error messages like No module named scss
when you run
make scss
, DO NOT use virtualenv.
Daily Development
# enter virtual Python environment (optional).
# Ignore this step if you get error with make command.
$ cd ~/dev/
$ source bin/activate
# start edit and develope
$ cd ~/dev/userpages/
# If something changes, re-generate the website:
$ make html
# start dev server
$ make serve
# open your browser and preview the website at http://localhost:8000/
UNLICENSE
All works, including posts and code, of Siong-Ui Te are released in public domain. Please see UNLICENSE.
References
Online reStructuredText editor
edit on Github link:
pelican-edit-url
reStructuredText:
reStructuredText Markup Specification
rst2html:
How can I get rst2html.py to include the CSS for syntax highlighting?
Hottest 'rst2html.py' Answers - Stack Overflow
rst2html stylesheet:
Writing HTML (CSS) Stylesheets for Docutilsrst2html css:
Documentation: Create GitHub like styled html doc file with rst2html
How to render reStructuredText documents with latest docutils on Ubuntu 12.04 LTS
restructuredtext center text:
Best way to align center a paragraph with RestructuredText?
Bootstrap image trigger modal:
Image Hover: