Development Tool: Pelican (static site generator written in Python)
Development Environment: Ubuntu 22.04
On a fresh/clean installation of Ubuntu, update system first. Otherwise will get unable to locate package error. See this SO answer.
$ sudo apt-get update
-
$ sudo apt-get install git $ sudo apt-get install python3-pip
From the answer in Ask Ubuntu, we can use python-is-python3 and prevent Python 2 from being installed on Ubuntu 20.04
$ sudo apt-get install python-is-python3 $ sudo apt-mark hold python2 python2-minimal python2.7 python2.7-minimal libpython2-stdlib libpython2.7-minimal libpython2.7-stdlib
Install language packages to add locale (English, Traditional Chinese, and Thai in this example):
$ sudo apt-get install language-pack-en $ sudo apt-get install language-pack-zh-hant $ sudo apt-get install language-pack-th
Or you can install languages in "Settings" -> "Region & Language", which installs more related packages such as fonts for languages.
git clone source code:
$ cd $ mkdir dev $ cd ~/dev/ $ git clone https://github.com/siongui/theravadacn.git --depth=1 # or clone with full depth $ git clone https://github.com/siongui/theravadacn.git YOUR_REPO
Install Python tools:
$ cd ~/dev/YOUR_REPO/ $ pip3 install -r requirements.txt
Install Pelican i18n_subsites plugin:
$ cd ~/dev/YOUR_REPO/ $ make download
Generate CSS file:
$ cd ~/dev/YOUR_REPO/ $ make scss
# start edit and develope
$ cd ~/dev/YOUR_REPO/
# re-generate the website and start dev server
$ make
# open your browser and preview the website at http://localhost:8000/
[1] | 覺醒之翼——上座部佛教文獻選譯集 (覺醒之翼——上座部佛教文獻選譯集) |