This project is made with org-mode, ox-hugo and Hugo. The org files are in
org
directory. Org files are converted into Hugo compatible Markdown files
using ox-hugo. These Markdown files are then converted into HTML using Hugo.
- Configure Emacs with org-mode and ox-hugo.
- Install Hugo.
- Clone the
src
branch. This branch contains the source code for the website.git clone [email protected]:guixcn/guixcn.github.io.git -b src
- Change into the project directory:
cd guixcn.github.io
- Update git submodules:
git submodule update --init
- Clone the master branch into the
public
directory. This branch contains the compiled result for the website:git clone [email protected]:guixcn/guixcn.github.io.git -b master public
- Open this file with Emacs.
- Execute this code block in Emacs (Hit
C-c C-c
):
(org-babel-goto-named-src-block "clean-up-hugo-project")
(org-babel-execute-src-block)
(org-babel-goto-named-src-block "convert-org-into-hugo")
(org-babel-execute-src-block)
(org-babel-goto-named-src-block "build-hugo-project")
(org-babel-execute-src-block)
Clean up Hugo project.
rm -rf content/* public/*
Convert Org files into Markdown files.
(save-window-excursion
(find-file "org/site.org")
(org-hugo-export-wim-to-md t))
(save-window-excursion
(find-file "org/blog.org")
(org-hugo-export-wim-to-md t))
(save-window-excursion
(find-file "org/wiki.org")
(org-hugo-export-wim-to-md t))
Build Hugo project.
hugo
Publish the result to GitHub Pages.
message=$(git show -s --format='%h %s')
cd public
s=$(git status -s)
if [ -n "$s" ]; then
git add -A
git commit -m "${message}"
git push origin master:master
fi
- You must accept the License.
- Clone this project, modify files in the
src
branch, and send your changes to upstream.
Unless otherwise noted, then:
- The Org files in
org
directory and the derived files incontent
andpublic
directory are released under CC BY-NC v4.0 License. - The Guix logo is designed by Luis Felipe López Acevedo and released under CC BY-SA v4.0 License. See https://guix.gnu.org/graphics/.
- The other files are released under GPLv3 License.