siongui / master-sheng-yen

聖嚴法師

Home Page:https://siongui.github.io/master-sheng-yen/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to Develope

Development Tool: Pelican (static site generator written in Python)

Development Environment: Ubuntu 20.04

First-time Setup

  1. Install git and pip:

    $ sudo apt-get install git
    $ sudo apt-get install python-pip
  2. 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
  3. git clone source code:

    $ cd
    $ mkdir dev
    $ cd ~/dev/
    $ git clone https://github.com/siongui/pelican-template.git YOUR_REPO
  4. Install Python tools:

    $ cd ~/dev/YOUR_REPO/
    $ sudo pip install -r requirements.txt
  5. Install Pelican i18n_subsites plugin and download normalize.css:

    $ cd ~/dev/YOUR_REPO/
    $ make download
  6. Generate CSS file:

    $ cd ~/dev/YOUR_REPO/
    $ make scss

Auto-deploy by GitHub Actions

See workflow file.

Auto-deploy by Travis CI

  1. Sing up a Travis CI account. Go to your profile page and enable Travis CI for the repository you want to build. (See Getting started - Travis CI)

  2. delete global secure environment variable in .travis.yml.

  3. Go to your GitHub. Generate a personal access token in Personal Settings (only public_repo privilege is enough).

  4. Install Travis CI command line client to encrypt token:

    $ sudo apt-get install ruby ruby-dev
    $ sudo gem install travis
  5. encrypt the token and add it to .travis.yml:

    $ travis encrypt GH_TOKEN=your_token --add -r YOUR_GITHUB_NAME/YOUR_REPO

Daily Development

# start edit and develope
$ cd ~/dev/YOUR_REPO/
# 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

[1]Deploy Website by Pelican, Travis CI, and GitHub Pages
[2]
[3]拈花微笑 聖嚴法師著_自序
[4]

About

聖嚴法師

https://siongui.github.io/master-sheng-yen/

License:The Unlicense


Languages

Language:SCSS 31.4%Language:HTML 31.0%Language:Python 30.4%Language:Makefile 5.7%Language:Go 1.5%