Open irvin opened 9 years ago
@petercpg @timdream 你們知道該怎麼處理嗎?
理論上在 deploy 的時候應該要有機制自動生,不用透過第三方服務
2015-03-17 10:41 GMT+08:00 wildsky notifications@github.com:
是這個嗎? https://www.xml-sitemaps.com/
— Reply to this email directly or view it on GitHub https://github.com/moztw/www.moztw.org/issues/189#issuecomment-82057536.
@ irvinfly: community liaison moztw.org Mozilla Taiwan community
Deploy 應該從來都沒有自動產生過,要這麼做的話看有沒有人要寫囉。
那過去是怎麼來的@___@
On Tue, Mar 17, 2015 at 11:33 AM Peter Chen notifications@github.com wrote:
Deploy 應該從來都沒有自動產生過,要這麼做的話看有沒有人要寫囉。
— Reply to this email directly or view it on GitHub https://github.com/moztw/www.moztw.org/issues/189#issuecomment-82072662.
好像是人工製造吧
On 17 March 2015 at 11:35, Irvin notifications@github.com wrote:
那過去是怎麼來的@___@
On Tue, Mar 17, 2015 at 11:33 AM Peter Chen notifications@github.com wrote:
Deploy 應該從來都沒有自動產生過,要這麼做的話看有沒有人要寫囉。
— Reply to this email directly or view it on GitHub https://github.com/moztw/www.moztw.org/issues/189#issuecomment-82072662.
— Reply to this email directly or view it on GitHub https://github.com/moztw/www.moztw.org/issues/189#issuecomment-82072813.
Po-chiang Chao (:BobChao) Mozillian and Creative Commoner, Taiwan http://twitter.com/bobchao http://blog.bobchao.net/
如果要用 grunt 產生要注意設定一些黑名單,例如 /node_modules,還有一些我們不想讓別人看到的網頁,例如 /inc 與 /*-dev
可參考 pr #218。
好,我有空時加上去
On 2015年3月27日週五 4:18 Peter Chen notifications@github.com wrote:
如果要用 grunt 產生要注意設定一些黑名單,例如 /node_modules,還有一些我們不想讓別人看到的網頁,例如 /inc 與 /*-dev
可參考 pr #218 https://github.com/moztw/www.moztw.org/pull/218。
— Reply to this email directly or view it on GitHub https://github.com/moztw/www.moztw.org/issues/189#issuecomment-86697897.
幾個問題拉回來這邊討論:
/docs
與某些 /events
底下的網頁還是不會被加入 sitemap、/node_modules
與 /community-dev
、/firefox/tw-dev
又還是會被加進來<lastmod>
會統一使用執行的時間,而且沒有更動的網頁的時間也會被更新,這個行為有問題。<changefreq>
都不是 daily。我一個一個解解看這些問題
<lastmod>
變成上一次執行grunt
的時間 @@我發現有一些網頁,像 /events/code-rush/
、/firefox/releases/
還是會被排除掉、/inc
裡面的東西還是會被加回來... 其他的可以暫時擱著不管但這個不大行...
<changefreq>
我先大概抓個保守的 monthly。
@petercpg
抱歉,我不小心打錯造成 inc
排除失敗,剛剛 PR 了已經修正錯誤,也把 sanstone
的排除併入同一行,看起來比較不囉唆
此外,我順便把 grunt.registerTask('map', ['sitemap']);
刪掉了,這行是多餘的
沒有被納入 sitemap 的是因為他們資料夾裡面沒有 .html
檔。
換句話說,先執行一次 grunt
後,再執行 grunt sitemap
就沒有這個問題了
@wi1d5ky Great! 我這看起來也 OK 了。剩下就是看要怎麼讓 sitemap 自動產生。
手動 commit 可能會忘而且 sitemap 應該不需要放進 VCS... 我想也許可以放在 base repo 的 autoupdate/update.sh
裡面,配合 git-received.php
在 auto update 的時候執行?
我剛剛也在想一樣的問題,不過我剛剛的想法是當有人下 git push
時,順便執行 grunt sitemap
。不過經你這麼一說,我也覺得不應該放進 VCS。
可是你後面我看不太懂XD 在沒有去深入了解的情況下沒辦法給什麼意見... 聽起來感覺是在主機那邊的自動化?如果可以自動化產生 sitemap 又不會擾亂版本控制的話就太好了!(我有空時再研究一下那個 repo)
還有一些地方要處理,來統整一下:
這三個還沒想到解法,可能要放到之後或是請其他人來解,現在就先弄 sitemap 自動化就好~
其實 Peter 後面說的「我想也許可以放在 base repo 的
autoupdate/update.sh
裡面,配合 git-received.php
在 auto update
的時候執行?」就是跟你說的「當有人下 git push
時,順便執行 grunt sitemap
」是同一回事哦!
On 2015年3月29日週日 3:19 wildsky notifications@github.com wrote:
(手機鍵盤果然沒辦法打那個符號… 對 markdown 的小無奈…
— Reply to this email directly or view it on GitHub https://github.com/moztw/www.moztw.org/issues/189#issuecomment-87287590.
@wi1d5ky 總之,你可以繼續調整 grunt sitemap 的設定。 只要可以產生正確的 sitemap,我們可以設定主機在更新時,自動在更新後跑 grunt sitemap,不需要 commit 的人在本地端做。
@mingtsay 嗯嗯~ 我有空再去研究研究 mozTW/base @irvin 了解,現在看來大致上是 OK,有人發現什麼問題再跟我說一聲我來補或是直接在 pattern 作修正就好
挖到以前的做法了,每週一早上 0 點會執行 /usr/bin/google-sitemapgen --config=/home/moztw/htdocs/sitemapgen_config.xml。
這個檔案不在 vcs 裡面有點棘手....。
就不用管以前的作法,改到機器上跑 grunt sitemap 啦?
Peter Chen notifications@github.com 於 2015年4月6日 星期一寫道:
挖到以前的做法了,每週一早上 0 點會執行 /usr/bin/google-sitemapgen --config=/home/moztw/htdocs/sitemapgen_config.xml。
這個檔案不在 vcs 裡面有點棘手....。
— Reply to this email directly or view it on GitHub https://github.com/moztw/www.moztw.org/issues/189#issuecomment-89960396.
@ irvinfly: community liaison moztw.org Mozilla Taiwan community
那要記得停用以前的 sitemap 機制,怕蓋掉新產生的檔案?
On 2015年4月6日週一 18:28 Irvin notifications@github.com wrote:
就不用管以前的作法,改到機器上跑 grunt sitemap 啦?
Peter Chen notifications@github.com 於 2015年4月6日 星期一寫道:
挖到以前的做法了,每週一早上 0 點會執行 /usr/bin/google-sitemapgen --config=/home/moztw/htdocs/sitemapgen_config.xml。
這個檔案不在 vcs 裡面有點棘手....。
— Reply to this email directly or view it on GitHub https://github.com/moztw/www.moztw.org/issues/189#issuecomment-89960396.
@ irvinfly: community liaison moztw.org Mozilla Taiwan community
—
Reply to this email directly or view it on GitHub https://github.com/moztw/www.moztw.org/issues/189#issuecomment-90005339.
問題在於 grunt 沒辦法針對資料夾表達更新頻率,這個可以,而且看起來這機制也沒啥不好。
不知道以前是如何產生 sitemap 的,看來最後一次更新是 2013 年,然後就消失了