Front-matter
Front-matter is a block of YAML or JSON at the beginning of the file that is used to configure settings for your writings. Front-matter is terminated by three dashes when written in YAML or three semicolons when written in JSON. YAML --- title: Hello World date: 2013/7/13 20:46:25 --- JSON "title": "Hello World", "date": "2013/7/13 20:46:25" ;;; Settin..
Read moreGenerating
Generating static files with Hexo is quite easy and fast. $ hexo generate Watch for File ChangesHexo can watch for file changes and regenerate files immediately. Hexo will compare the SHA1 checksum of your files and only write if file changes are detected. $ hexo generate --watch Deploy After GeneratingTo deploy after generating, you can run one of the..
Read moreGitHub Pages
In this tutorial, we use GitHub Actions to deploy GitHub Pages. It works in both public and private repository. Skip to the One-command deployment section if you prefer not to upload your source folder to GitHub. Create a repo named username.github.io, where username is your username on GitHub. If you have already uploaded to other repo, rename the repo i..
Read moreGitLab Pages
Create a new repository named username.gitlab.io, where username is your username on GitLab. If you have already uploaded to other repo, rename the repo instead. Enable Shared Runners via Settings -> CI / CD -> Shared Runners. Push the files of your Hexo folder to the repository. The public/ folder is not (and should not be) uploaded by default, mak..
Read moreHelpers
Helpers are used in templates to help you insert snippets quickly. Helpers cannot be used in source files. You could easily write your own custom helper or use our ready-made helpers. URLurl_forReturns a url with the root path prefixed. Output is encoded automatically. <%- url_for(path, [option]) %> Option Description Default relative Outpu..
Read more