內容目錄
前言介紹
- 這款 WordPress 外掛「Documents from Git」是 2020-04-02 上架。
- 目前有 300 個安裝啟用數。
- 上一次更新是 2021-10-09,距離現在已有 1302 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 5.0.0 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 7.0 以上。
- 有 3 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
外掛標籤
Github | jupyter | markdown | Notebook | Bitbucket |
內容簡介
官方文件: https://github.com/gis-ops/wordpress-markdown-git
這個WordPress外掛讓您能夠輕鬆地從您最喜愛的遠端Git平台上發布、協作和版本控制您的[Markdown, Jupyter notebook]文檔,即使它是自己託管的。
優勢包括:
使用您喜愛的編輯器撰寫文檔,只需將其推送到您的遠端存儲庫即可立即更新您的博客
利用版本控制的威力:在不同的文章中發布不同版本的文檔,例如從除了最新的master之外的另一個分支或提交中發布
簡便地由您的讀者透過pull請求更新文檔,減少過時教程的機會
目前支援以下類型的文檔:
Markdown
Jupyter筆記本(僅限公共存儲庫)
目前支援以下平台:
Github
Bitbucket
Gitlab
使用方法
請注意,這個外掛使用Github精彩的/markdown API來呈現HTML。此處有2個注意事項:
除非授權,否則速率限制被設置為60個請求每分鐘。自v1.1.0版本以來,插件能夠靜態地緩存內容。如果這對您來說不夠靈活,您目前唯一的選擇是不使用任何快取,在這種情況下,每當有人在您的站點上打開文章時,每個文檔都會從您的提供者中拉取。然後強烈建議您創建一個Githu訪問令牌並在外掛中註冊它。然後速率限制將設置為每小時5000個請求。詳細信息請參閱全局屬性部分。
Markdown內容不可以超過400 KB,因此大約是400,000個字符包括空格。如果不是專業論文,這不應該是一個應用限制。
短代碼
本插件具有多種短代碼。
發布文檔
特定於文件的短代碼遵循一種模式[git-do平台-操作],其中
平台可以是以下之一
github:如果您使用Github作為您的版本控制系統平台
bitbucket:如果您使用Bitbucket作為您的版本控制系統平台
gitlab:如果您使用Gitlab作為您的版本控制系統平台
操作可以是以下之一
markdown:以Github的呈現樣式呈現在您的VCS平台上托管的Markdown文件
jupyter:呈現在您的VCS平台上托管的Jupyter筆記本(僅限公共存儲庫)
checkout:呈現一個像徽章一樣的小框,帶有文檔的鏈接和最後一次提交的日期
history:呈現一個包含最後的提交日期、消息和作者的
部分
修改呈現樣式
此外,還有一個包含的短代碼[git-add-css],它添加了一個
將CSS文件添加到您的主題根目錄中,其中包含一些類,例如class1、class2、class3
通過添加wp_enqueue_style('my-style', get_template_di
原文外掛簡介
Official documentation: https://github.com/gis-ops/wordpress-markdown-git
This WordPress Plugin lets you easily publish, collaborate on and version control your [Markdown, Jupyter notebook] documents directly from your favorite remote Git platform, even if it’s self-hosted.
The advantages are:
Write documents in your favorite editor and just push to your remote repository to update your blog instantly
Use the power of version control: publish different versions of the document in different posts, i.e. from another branch or commit than latest master
Easy to update by your readers via pull requests, minimizing the chance of stale tutorials
The following document types are currently supported:
Markdown
Jupyter notebooks (only for public repositories)
The following platforms are currently supported:
Github
Bitbucket
Gitlab
Usage
Note, this plugin uses Github’s wonderful /markdown API to render to HTML. This comes with 2 caveats:
Unless authenticated, the rate limit is set at 60 requests per minute. Since v1.1.0 the plugin is capable of statically caching content. In case that’s not dynamic enough for you, your only option currently is to not use any cache in which case every document will be pulled from your provider every time someone opens it on your site. Then it’s strongly recommended to create a Github access token and register it with the plugin. Then the rate limit will be set to 5000 requests per hour. See Global attributes section for details on how to do that.
The Markdown content cannot exceed 400 KB, so roughly 400 000 characters incl whitespace. If not a monographic dissertation, this should not be an applicable limit though.
Shortcodes
The plugin features a variety of shortcodes.
Publish documents
The document-specific shortcodes follow a pattern of [git-
github: if you use Github as your VCS platform
bitbucket: if you use Bitbucket as your VCS platform
gitlab: if you use Gitlab as your VCS platform
markdown: Render your Markdown files hosted on your VCS platform in Github’s rendering style
jupyter: Render your Jupyter notebook hosted on your VCS platfrom (only for public repositories)
checkout: Renders a small badge-like box with a link to the document and the date of the last commit
history: Renders a