[Turn] Hexo blog to add custom HTML page

 

6b1htm0.jpg

Change the "Friends of the chain" for the "ZONE", added some previous collection of effects page.
By the way how to blog to add custom HTML file.

First, the blog root sourcefolder, create a new folder for storing HTML files

20190805222613.png

Here I built a ZONEfolder and sub-folders stored inside each HTML file, of course, you can just create a home folder, which put directly in the file is required.

The second step in the configuration file blog root directory of the _config.ymlfile, skip rendering

20190805223219.png

Format Note: This is only if you created a folder, you want to skip all rendered in its own directory files, write:

# 跳过文件夹下所有文件
skip_render: 
  - "文件夹名/*"  

If, as I did, there folder subfolders, then write:

# 跳过子文件夹
skip_render: 
  - "文件夹名/子文件夹名/*"

Or, more straightforward way

# 跳过文件夹下所有子文件夹和文件
skip_render: 
  - "文件夹名/**"   

QQ screenshot 20190807141009.png

Finally, processing css, js file

As we all know, hexo deployment is a static document, md file all articles will be rendered as an html file (hexo g generation),
HEXO will help us put all the css, js files are added to the article, we skipped before rendering (second step), so we need to manually
integrate css, js html file to the general structure of our code is this:

20190805225310.png

The following two parts:

css

Find the index.htmldocuments in the statement, like this:

    <link rel="stylesheet" href="css/xxx.css">   
    <!-- css目录下的xxx.css文件 -->

Directly to the corresponding file in the css folder inside xxx.css, copy the contents of the file, the above code to read:

    <style> css代码内容 </style>

js

Find the index.htmldocuments in the statement, like this:

    <script src="js/xxx.js"></script>

Directly to the corresponding file in the js folder inside xxx.js, copy the contents of the file, the above code to read:

    <script> js代码内容 </script>

Redeploying.

 

Published 238 original articles · won praise 144 · views 860 000 +

Guess you like

Origin blog.csdn.net/u011331731/article/details/105091276