Duanyll's new blog, can be visited at duanyll.com.
To build this site, you have to
- Clone the repository
- Install Pandoc into the path
- Run
yarn
- Run
yarn build
And the static site will be inside the public
folder. Refer to .github\workflows\hexo.yml for CI build process.
This site uses some extensions to the Markdown syntax, based on the Pandoc Markdown. Here are the list of exclusive extensions:
.vscode\settings.json and _config.yml contains lots of math marcos to make writing math easier. .vscode\settings.json defines marcos for KaTeX rendering in Markdown All in One VSCode extension, while _config.yml defines marcos for MathJax rendering in Hexo. All maths are rendered to SVGs at build time and embedded in the HTML. This wastes bandwidth but actually makes the site faster than rendering math on the client side.
Markdown links ([alt text](url)
syntax) referring to other markdown files will be converted to correct URLs. To trigger the conversion, the URL should begin with /
(relative to project root) or ./
(relative to current directory). For example, [link text](/source/_posts/oi/2018-10-16-Simulate-Anneal.md)
will be converted to /2018/10/16/Simulate-Anneal/
. This allows to navigate to other posts within Visual Studio Code.
Markdown images (
syntax) will have alt text
displayed as a caption below the image. This is implemented by converting the image to a liquid tag before rendering with Pandoc. However, this may cause trouble with nested liquid tags, for example, in {% swiper %}
tags. In this case, use the below syntax to enforce standard Markdown rendering:
{% swiper width:max effect:cards/coverflow %}



{% endswiper %}
This site supports rendering TikZ graphics using TikzJax running on server side. To use this feature, use the Pandoc Markdown syntax of inserting raw LaTeX code:
```{=latex}
\begin{tikzpicture}
\draw (0,0) -- (1,1);
\end{tikzpicture}
```
This site supports exporting posts to PDF files via Pandoc and LaTeX. All above Markdown extensions are supported in the PDF export. To export a post to PDF, run the following command:
yarn make-pdf source/_posts/your-post.md
Due to the limitations of hexo-related-popular-posts
and other plugins, live updates in yarn server
will always fail. Always restart the server after making changes to the posts.