2024-05-28 Hexo 分類及標籤設定

2024-05-28 Hexo 分類及標籤設定

https://lilylovesjeans.github.io/apple.lily/2024/05/27/hexo-setup-1/

2024-05-28 試著學 Hexo - SEO 篇 - Google Search Console

文獻連結:
https://ithelp.ithome.com.tw/articles/10249885

  1. 終端機執行結果, 會產生 sitemap.xml 部署到 github 網站上:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
 ~% npm install hexo-generator-sitemap --save   

added 8 packages, and audited 246 packages in 2s

29 packages are looking for funding
run `npm fund` for details

found 0 vulnerabilities

....
....
....
(base) ~ % sudo hexo d
INFO Validating config
INFO Deploying: git
INFO Clearing .deploy_git folder...
INFO Copying files from public folder...
INFO Copying files from extend dirs...
[master 7d8d7a3] Site updated: 2024-05-28 00:07:21
......
.....

3 files changed, 227 insertions(+), 1 deletion(-)
create mode 100644 sitemap.txt
create mode 100644 sitemap.xml
Enter passphrase for key '/var/root/.ssh/id_rsa':
Enumerating objects: 9, done.
Counting objects: 100% (9/9), done.
Delta compression using up to 4 threads
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 1.40 KiB | 1.40 MiB/s, done.
Total 6 (delta 2), reused 0 (delta 0)

  1. 如果在 Google Search Console 的 Sitemap提交 sitemap.xml
    顯示錯誤:

    檢查一下 hexo /_config.yml , 裹面的 URL 設定是否有誤(比如 https -> ttps ❌)

    並檢查 public\sitemap.xml

    更改之後,在專案目錄下的 執行命令:

1
2
3
hexo clean
hexo generate
sudo hexo depoly

在 public\目錄之下會產生新的 sitemap.xml
打開看一下,內容是否正確:

再重新提交 sitemap.xml

成功後, 會顯示如下: