| 开发者 | wakalab |
|---|---|
| 更新时间 | 2026年6月23日 13:05 |
| 捐献地址: | 去捐款 |
| PHP版本: | 8.2 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
/wp-content/plugins/markdown-renderer-for-github directory, or install the plugin through the WordPress plugins screen directly.[gfm-renderer] shortcode.GitHub Flavored Markdown (GFM) is an extension of standard Markdown that includes features like tables, task lists, syntax highlighting, and automatic URL linking. It's the same format used on GitHub.com.
The plugin ships native Shiki grammars for 30+ programming languages, including JavaScript, TypeScript, Python, PHP, Java, C, C++, C#, HTML, CSS, SQL, Go, Rust, and Ruby. Languages without a bundled grammar fall back to a close match, so many more are still highlighted. The highlighting is powered by Shiki, the same engine used by VS Code.
Yes! You can create beautiful diagrams using Mermaid syntax. Nine diagram types are supported:
Yes! You can create interactive charts using Chart.js with simple JSON configuration. Supported chart types include:
Yes. ```plantuml blocks are supported, but unlike Mermaid and Chart.js, PlantUML has no in-browser renderer. To draw a PlantUML diagram its source is sent to an external PlantUML/Kroki server (the default is the public https://www.plantuml.com/plantuml endpoint, and you can point it at a self-hosted server instead). This is opt-in: nothing is sent until you enable PlantUML, set a server URL, and accept the privacy notice in the settings. See the Third Party Services section for details.
By default, no. Shiki, Mermaid, and Chart.js are bundled locally and run entirely on your server with no network requests. Two optional features are the exception and are off until you opt in: PlantUML rendering and server-side (Kroki) Mermaid rendering. Both send diagram source to a rendering server only after you enable and configure them. See the Third Party Services section.
It does not use a CDN. All rendering libraries (Shiki, Mermaid, Chart.js) ship inside the plugin and are served from your own WordPress installation, so the plugin works offline and in closed or air-gapped networks. This also makes it GDPR-friendly by default. The only network traffic comes from the optional PlantUML and server-side Mermaid (Kroki) features, which stay off until you enable them.
Absolutely! All features including syntax highlighting, diagrams, and the copy button work perfectly on mobile devices.
GitHub Flavored Markdown Renderer is designed for minimal performance impact with smart asset lazy loading: the highlighting and diagram libraries load only on pages that actually use them. The libraries are large uncompressed (Shiki ~2.35 MB, Mermaid ~3.2 MB) but shrink to roughly 302 KB and 908 KB over gzip or Brotli, and the plugin adds a Site Health check that confirms your server is compressing them.
Every rendering feature described above - GitHub Flavored Markdown, Shiki syntax highlighting, Mermaid diagrams, Chart.js charts, and PlantUML - is included in this free plugin. You do not need Pro to use any of them. The separate Pro add-on is a standalone plugin that builds on the same core and adds developer conveniences: line numbers for code blocks, advanced syntax-highlighting options, custom Shiki themes, and priority support.
Yes, the plugin provides CSS variables and hooks for customization. You can easily match your theme's design.
Yes, the plugin is fully internationalized and translation ready. Japanese translation is included.
There are two ways. In the block editor, use the dedicated "Markdown" block. Anywhere else - the Classic editor, a theme template via do_shortcode(), or a widget - wrap your Markdown in the [gfmr_markdown] enclosing shortcode:
`[gfmr_markdown]
Heading
theme attribute, e.g. [gfmr_markdown theme="github-dark"]. To show a literal [gfmr_markdown] inside a code block, double the brackets: [[gfmr_markdown]]. For best results put the shortcode in the post body or page content; when called from a theme template or widget, some pages may need the plugin assets to be present already (for example a page that also uses a Markdown block or a code block).
Yes. Add the Markdown block to any post or page and write GitHub Flavored Markdown directly in the editor, with a live preview of the rendered result. Existing Markdown files - READMEs, docs, changelogs - can be pasted in as-is.
Yes. Fenced code blocks get automatic code highlighting out of the box. Name a language for its exact grammar, or let automatic language detection pick one. Highlighting runs entirely on your own site - no external highlighter service is involved.
Not at all! The plugin works with standard Markdown syntax that's easy to learn. The Gutenberg block provides a user-friendly interface with live preview.
Yes, GitHub Flavored Markdown Renderer is designed to work with any properly coded WordPress theme. The styling is designed to integrate seamlessly with your site's design.