Giter VIP home page Giter VIP logo

guixcn.github.io's Introduction

Guix China Community

README

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.

Build And Publish This Project

Preparation

  • 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
        

Build

  • 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

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

Contribute

  • You must accept the License.
  • Clone this project, modify files in the src branch, and send your changes to upstream.

License

Unless otherwise noted, then:

Local Variables

guixcn.github.io's People

Contributors

1luhux1 avatar qbladea avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.