針對 Github Pages 建立 sitemap 樣版檔
18 Jan 2022
針對 Github Pages 建立 sitemap 樣版檔
因為 Github Pages 不支援使用 Plugin
參考以下連結手動建立 sitemap.xml 樣版檔
然後可以在 post 及 page 頁面資料中,加入 sitemap 參數
sitemap 的設定,可以參考 sitemap 官方組織
如果沒有加,就會以 sitemap.xml 預設值為主
啟動本地模擬
會在 _site 目錄下自動生成 sitemap.xml
然後 commit 後 push 到 Github 就可以
然後就可以提交 Google Search Console
如果使用 Plugin 的話,但注意 Github Pages 不支援
Jekyll plugin to silently generate a sitemaps.org compliant sitemap for your Jekyll site
參考
不使用套件直接產生 Jekyll 的 sitemap.xml
回上一頁