Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SEO - 加入 robots.txt, sitemap, prerender 讓搜尋引擎可以獲取網頁資訊 #589

Merged
merged 8 commits into from
Mar 2, 2019

Commits on Feb 24, 2019

  1. 加入 robots.txt 與 sitemap

    加入 robots.txt 與 sitemap 以幫助搜尋引擎爬網站
    
    由於內容的網址必須動態產生,因此 robots.txt 不能使用單純的靜態檔案提供
    
    sitemap針對公司網址會依照公司評級指定優先度,評級高的公司會有較高的優先度推薦搜尋引擎抓取 (抓取順序不影響搜尋結果排序)
    SoftwareSing committed Feb 24, 2019
    Configuration menu
    Copy the full SHA
    3d7b2a2 View commit details
    Browse the repository at this point in the history

Commits on Feb 28, 2019

  1. 加入 prerender 服務

    使用 prerender 來讓搜尋引擎的BOT可以抓到完整的頁面
    
    當收到BOT的訪問請求時,會轉由 prerender server 代為訪問網站,並將完整的結果傳回去
    
    prerender server 會監聽的port可以在config中修改
    SoftwareSing committed Feb 28, 2019
    Configuration menu
    Copy the full SHA
    3572e6c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6fb18c6 View commit details
    Browse the repository at this point in the history
  3. 設置等待時間讓prerender有足夠的時間render

    設定3秒的等待時間,讓網頁能跑完整,也避免過於快速的做下一次請求造成伺服器負擔
    SoftwareSing committed Feb 28, 2019
    Configuration menu
    Copy the full SHA
    da40f7a View commit details
    Browse the repository at this point in the history
  4. 更新 robots 內的規則

    增加更多不希望搜尋引擎去爬的頁面
    SoftwareSing committed Feb 28, 2019
    1 Configuration menu
    Copy the full SHA
    544e895 View commit details
    Browse the repository at this point in the history
  5. 修正錯字

    SoftwareSing committed Feb 28, 2019
    Configuration menu
    Copy the full SHA
    012eff9 View commit details
    Browse the repository at this point in the history
  6. 增加 production mode

    在 production 設定為 true 的情況下才會開啟 prerender server
    SoftwareSing committed Feb 28, 2019
    Configuration menu
    Copy the full SHA
    c20c70c View commit details
    Browse the repository at this point in the history
  7. Update README.md

    SoftwareSing committed Feb 28, 2019
    Configuration menu
    Copy the full SHA
    de50d66 View commit details
    Browse the repository at this point in the history