Article Directory
Hexo blog to their insert a page with its own style of writing.
Implementation
Hexo official shows two ways to insert custom page: First render to the specified file, display a custom form page specified in the subject area; the second is related to a file or folder is ignored, completely not render directly copy
to public
folder link.
Rendering section
The principle
To add a single file does not mark application template for dealing with individual special file.
Implementation
Add the following tags do not need to render articles or HTML file header:
---layout: false---
In this way, the file will not be rendered through the template, the final release to the /public/
documents in the file is removed after marking the way.
Exclude files
The principle
Only
source
directory under the file will be posted topublic
(be able to access on the network), thus rendering Hexo onlysource
files in the directory.skip_render
Path parameter is set with respect tosource
the directory path.
Hexo profile provides a configuration item skip_render
is used for directories or files not needed for rendering excluded.
-
Exclude individual files
skip_render: 'test.html'
-
Exclude multiple files
skip_render: - '1.html' - '2.html'
-
Regular expression match
skip_render: '*.html'
Note
skip_render
the matching foldersource
, it will exclude allsource
files in a folder at the end of the HTML, but does not match to a subdirectory. -
Excluding directories
skip_render: 'demo/*'
-
Exclude multiple directories
skip_render: - 'test/*' - 'demo/*'