HEXO specifies 404 page_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:57:18
Original
1388 people have browsed it

HEXO specifies 404 page
Since Hexo is hosted on github, adding a 404 page is very easy. You only need to create a new 404 page under xxx.github.io. The code is as follows:

                        <p class="sycode">                            1                        </p>                        <p class="sycode">                            2                        </p>                        <p class="sycode">                            3                        </p>                        <p class="sycode">                            4                        </p>                        <p class="sycode">                            5                        </p>                        <p class="sycode">                            6                        </p>                        <p class="sycode">                            7                        </p>                        <p class="sycode">                            8                        </p>                        <p class="sycode">                            9                        </p>                        <p class="sycode">                            10                        </p>
Copy after login
                        <p class="sycode">                      <!DOCTYPE html>                        </p>                        <p class="sycode">                      <html lang="en">                        </p>                        <p class="sycode">                      <head>                        </p>                        <p class="sycode">               	       <meta charset="UTF-8">                        </p>                        <p class="sycode">               	       <title>404       </title>                        </p>                        <p class="sycode">                      </head>                        </p>                        <p class="sycode">                      <body>                        </p>                        <p class="sycode">                            	自定义                        </p>                        <p class="sycode">                      </body>                        </p>                        <p class="sycode">                      </html>                        </p>
Copy after login

We can also use Tencent’s public welfare 404 page
and just copy the javascript code in the page into our code

                        <p class="sycode">                            1                        </p>                        <p class="sycode">                            2                        </p>                        <p class="sycode">                            3                        </p>                        <p class="sycode">                            4                        </p>                        <p class="sycode">                            5                        </p>                        <p class="sycode">                            6                        </p>                        <p class="sycode">                            7                        </p>                        <p class="sycode">                            8                        </p>                        <p class="sycode">                            9                        </p>                        <p class="sycode">                            10                        </p>                        

11

Copy after login
                        <p class="sycode">                      <!DOCTYPE html>                        </p>                        <p class="sycode">                      <html lang="en">                        </p>                        <p class="sycode">                      <head>]\                        </p>                        <p class="sycode">	                        </p>                        <p class="sycode">               	       <meta charset="UTF-8">                        </p>                        <p class="sycode">               	       <title>404       </title>                        </p>                        <p class="sycode">                      </head>                        </p>                        <p class="sycode">                      <body>                        </p>                        <p class="sycode">               	       <script type="text/javascript" src="http://www.qq.com/404/search_children.js" charset="utf-8">              </script>                        </p>                        <p class="sycode">                      </body>                        </p>                        <p class="sycode">                      </html>                        </p>
Copy after login

as shown below :

At this time you will find that when you deploy hexo again, the 404 page on github has been deleted again. This is because your hexo does not have this file in your local folder, so it will be gone as soon as it is synchronized. Even if you add it in the local root directory, hexo will delete it.

Therefore, this 404 page should be placed under the source directory. (Note, do not put it in the post under source)
Files placed under source will be uploaded but will not be parsed into the article. The source directory structure is as follows

This You're done

Enter a non-existent domain name and you will see the results

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template