徵音梅林 Website on Github.io https://projectmeilin.github.io/
- Docker 4.6.0 above
- Debian 11
- Pelican 4.7.2
- Pull repo
git clone https://github.com/ProjectMeilin/ProjectMeilin.github.io.git
- Build docker images and run
cd ProjectMeilin.github.io
docker-compose up -d --build- Enter development container
docker-compose exec project_meillin_wiki /bin/bash ## now you are in container root@4f062e1e7cc3:/work/src#
- setup python3 virtualenv and install packages
## run in container virtualenv ENV source ENV/bin/activate ## you will enter venv (ENV) root@4f062e1e7cc3:/work/src# ## then install python3 needed packages pip install -r requirements.txt
Congrats! Now you are ready for development!
-
新增/修改
contents/zh/*.md(有三種語言:zh, ja, en) -
metadata格式 必須填入
Lang,Category,Slug. 會產生對應頁面 如/$LANG/$Category/$Slug.html -
Mardown檔案編輯完畢後,執行
./build.sh,就會自動產生output資料夾
- build all pages
./build.sh
- Test in local. http://localhost:8000
make serve-global
如何把gh-pages branch的output推到github page上
git checkout gh-pages git fetch --all git checkout origin/source -- output cp -pr output/* ./ && rm -rf output git add . && git commit -m "update new files to gh-pages" git checkout master git merge gh-pages git push --all
MIT