README
This blog is shared by Chao Xu, the technology used to build the site is listed here. Source code is publicized selflessly by Chao Xu.
My reproduction is as follows:
Download the develop branch(source code) into local and we will get a directory named chaoxu.github.io:
$ git clone -b develop https://github.com/chaoxu/chaoxu.github.io.gitInstall GHCup(which is the main installer for the general purpose language Haskell):
$ curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | shSee more in here. Now we can enter
ghcito start an interactivate environment like ipython.To compile ChaoDoc.hs:
Install pandoc(see here):
$ wget https://github.com/jgm/pandoc/releases/download/2.19.2/pandoc-2.19.2-1-amd64.deb $ sudo dpkg -i $DEBWhere
$DEBis the path to the downloaded deb. This will install the pandoc executable and man page. Install pandoc library for haskell(see here):$ cabal update $ cabal install [--lib] pandocIf failed with ‘cannot find -lgmp’, we need to pre-install the gmp library:
$ sudo apt install libgmp-devBelow two libraries also needed, otherwise error will raise:
$ cabal install --lib pandoc-types $ cabal install --lib regex-compatInstall pandoc-citeproc:
$ sudo apt-get install pandoc-citeprocCompile the .hs file(see here):
$ ghc ChaoDoc.hsNote: just for testing(if the environment is installed successfully), donot forget to delete the generated file.
To compile katex_cli:
Install cargo(see here): Download script(rustup-init.rs) from https://sh.rustup.rs and run it:
$ sh ./rustup-init.rsAfter installing Rust and Cargo, you must source the env file(where the
$HOMEis your home path: ~):$ source $HOME/.cargo/envDownload the cargo project and cd into it:
$ git clone https://github.com/chaoxu/katex_cli.gitCompile it:
$ cargo buildThen we can obtain executable katex_cli in generated target/debug/, copy katex_cli to the root of chaoxu.github.io.
To compile site.hs:
Install hakyll library of haskell:
$ cabal install hakyllSee more in https://jaspervdj.be/hakyll/ In addition, we need to pre-install the tinfo library:
$ sudo apt-get install libtinfo-devCompile the .hs file:
$ ghc site.hsNote: just for testing.
Install pyyaml, mistune, jinja2 and bs4:
$ conda install --file requirements.txtCreate your own depository on github, reset as the remote url of downloaded chaoxu.github.io:
$ git remote rm origin $ git remote add origin <your depository url>Modify push.sh with line 13, 15 and 16, uncomment them, then run the shell script:
$ ./push.sh
That’s all, Thanks!