HEXO - search engine optimization(SEO)
How can I make my blog search on various search sites?
After you create a blog, you need to proceed with optimization to expose your blog to the search engine.
Installing the plug-in required for search engine optimization (SEO)
- hexo-auto-canonical
- hexo-generator-robotstxt
- hexo-autonofollow
- hexo-generator-feed
- hexo-generator-seo-friendly-sitemap
1. hexo-auto-canonical
A plug-in that automatically makes a representative URL (standard link).
1 | npm install --save hexo-auto-canonical |
Install the module through git
as shown above.
After installation, in the path of the blog (based on the main directory), Insert the code below <%- meta(page) %>
in the ejs file that is themes > hueman > layout > common > head.ejs
.
1 | //.ejs |
If inserted, the code will be as below.
1 | <%- meta(page) %> |
2. hexo-generator-robotstxt
This plug-in automatically makes the robot.txt file.
1 | npm install hexo-generator-robotstxt --save |
Install the module through git
as shown above.
After installation, open the _config.yml (not the theme _config.yml)
file in the blog directory and input it as below.
1 | robotstxt: |
3. hexo-autonofollow
A plug-in that automatically adds rel="external noofollow"
properties to external links.
1 | npm install hexo-autonofollow --save |
Install the module through git
as shown above.
After installation, open the _config.yml (not the theme _config.yml)
file in the blog directory and input it as below.
1 | nofollow: |
4. hexo-generator-feed
This plug-in automatically makes RSS feed
.
1 | npm install hexo-generator-feed --save |
Install the module through git
as shown above.
After installation, open the _config.yml (not the theme _config.yml)
file in the blog directory and input it as below.
1 | feed: |
5. hexo-generator-seo-friendly-sitemap
Automatically creates site map xml files for crawlers to crawl blogs more efficiently.
1 | npm install hexo-generator-seo-friendly-sitemap --save |
Install the module through git
as shown above.
After installation, open the _config.yml (not the theme _config.yml)
file in the blog directory and input it as below.
1 | sitemap: |
Adding all, _config.yml file will be completed as follows.
1 | ... |