內容簡介
在你的 WordPress 網站上加入 GitHub 的 Zen。GitHub 團隊提供了一個很棒的 API 網址 https://api.github.com/zen,裡面有各種吸氧的訊息。此外掛會從中抓取這些訊息,提供小工具或簡碼使用。
Timeout
API 對於匿名使用者每分鐘僅提供 60 次的請求。建議標準的超時時間為 20 分鐘,以應付正常的負載。資料會在超時期間儲存在一個短暫快取中,讓內部可以在這段期間使用,而 API 則在超時後進行更新。
Widget
使用 DX GitHub Zen Widget,並設定訊息的標題及超時時間。
Shortcode
在你的文章/頁面中使用 [dx_github_zen] 簡碼,以在該處顯示這些訊息。
外掛標籤
開發者團隊
原文外掛簡介
Add some Zen by GitHub to your WordPress website. The guys from GitHub provide a great API at https://api.github.com/zen with various geeky messages. The plugin is fetching the messages for use in a widget or shortcode.
Timeout
The API has a limit of 60 requests/min for anonymous users. A standard timeout of 20min is recommended for a normal load. Data is stored in a transient for internal access over the timeout period before updating it from the API.
Widget
Use the DX GitHub Zen Widget and set a title and timeout for your messages.
Shortcode
Use the [dx_github_zen] shortcode in your posts/pages to display the messages there.
