Contributing
We welcome you to join the development of Hexo. 🤗 DevelopmentWe welcome you to join the development of Hexo. This document will help you through the process. Before You StartPlease read Contributor Covenant Code of Conduct first. Please follow the coding style: Follow Google JavaScript Style Guide. Use soft-tabs with a two space indent. Don’t put commas ..
Read moreData Files
Sometimes you may need to use some data in templates which is not directly available in your posts, or you want to reuse the data elsewhere. For such use cases, Hexo 3 introduced the new Data files. This feature loads YAML or JSON files in source/_data folder so you can use them in your site. For example, add menu.yml in source/_data folder. Home: / Gall..
Read moreFront-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 more