Directory Structure#
.
├── .deploy_git
├── node_modules
├── public
├── scaffolds
│ ├── draft.md
│ ├── page.md
│ └── post.md
├── source
│ └── _posts
│ └── hello-world.md
├── themes
├── .gitignore
├── _config.yml
├── db.json
├── package.json
└── package-lock.json
.deploy_git#
Automatically created after deploying to GitHub with the command hexo d
. The structure of this directory is similar to the public
directory (the only difference is that it may be inconsistent due to regeneration without publishing the site, in which case the content in public
is newer than that in .deploy_git
).
node_modules#
Stores the installed Hexo extensions, which are the corresponding node dependency modules.
public#
When the hexo g
command is executed, the Hexo program compiles the source
and theme
directories, and the generated static webpage content is stored in the public
directory.
The contents of the generated public
folder can be directly deployed as a static website.
When the hexo d
command is executed, the contents of the public
directory are copied to the .deploy_git
directory.
scaffolds#
"Scaffolds" refers to the templates used when creating a new article (hexo new 'title'
). Hexo builds based on the files in this directory.
source#
Location for storing user resources.
_posts#
Location for storing blog articles. The markdown
files, HTML files, org files, etc. will be parsed and placed in the public
folder for publishing on the site.
Other files/folders starting with _#
These will be ignored. Therefore, you can create a _drafts
directory in the source
directory to store unfinished drafts, which will not be published on the website.
Other files/folders not starting with _#
These will be copied to the public
directory and uploaded to the site.
- You can create an
img
directory to store images referenced in the blog, etc. - To add a new page (e.g.
about
), execute the commandhexo new page PageName
, and a subdirectoryPageName
will be automatically created insource
. - The
favicon.ico
file is referenced in the theme configuration file as/favicon.ico
to set the site's page icon.
themes#
Directory for the website's theme. The default installation includes the landscape
theme, but you can install new themes in the themes
directory or create your own.
_config.yml#
Global configuration file where many website details are configured, such as site name, subtitle, description, author, language, theme, deployment, etc.
db.json#
Automatically generated JSON file that can be used to manage and search for blog files. It can be ignored.
package.json#
Parameters and dependencies of the Hexo framework and all installed plugins.