Build Personal Blog -- Bring your blog to the world (SEO)
Add Google Analytics
Register on Google Analytics
Apply a new account for your website and you will get an
tracking_id
likeUA-14xxxx949-1
Update NexT
_config.yml
1
2
3google_analytics:
tracking_id: UA-14xxxx949-1
localhost_ignored: true
Add SEO Related
Add Sitemap
npm install hexo-generator-sitemap --save
Add following config in hexo
_config.yml
:1
2sitemap:
path: sitemap.xmlchange URL to your own domain
Add robot.txt
Create a new file named
robot.txt
under the folder hexosource
, and fill in the following text.1
2
3
4
5
6
7
8
9
10
11
12
13User-agent: *
Allow: /
Allow: /archives/
Disallow: /vendors/
Disallow: /js/
Disallow: /css/
Disallow: /fonts/
Disallow: /vendors/
Disallow: /fancybox/
Sitemap: https://pojian.xyz/sitemap.xml
Sitemap: https://pojian.xyz/baidusitemap.xmlhexo clean
hexo g -d
Add sitemap to Google Search Console
- Post link: https://leisurelyfool.com/posts/35959.html
- Copyright Notice: All articles in this blog are licensed under BY-NC-SA unless stating additionally.