Description
Markdown Renderer for GitHub transforms your WordPress content with beautiful GitHub Flavored Markdown (GFM) rendering. Perfect for technical blogs, documentation sites, and any content that needs professional code presentation.
Key Features:
๐จ Beautiful Syntax Highlighting
* Powered by Shiki – the same syntax highlighter used by VS Code
* Support for 100+ programming languages
* Multiple beautiful themes (GitHub Light/Dark, VS Code themes, and more)
* Automatic language detection
๐ Mermaid Diagram Support
* Create flowcharts, sequence diagrams, and more
* Professional diagram rendering
* Interactive zoom functionality
* Error handling with user-friendly messages
๐ Chart.js Chart Support
* Create line, bar, pie, doughnut, and more chart types
* 8 chart types including scatter, bubble, radar, and Polar Area
* Simple JSON configuration in “`chart fenced code blocks
* Responsive and interactive charts
โจ GitHub Flavored Markdown
* Tables, task lists, strikethrough
* Automatic URL linking
* Footnotes support
* 100% compatible with GitHub markdown
๐ Copy Button Feature
* One-click code copying
* GitHub-style user experience
* Full accessibility support
* Mobile-friendly design
โก Performance Optimized
* Asset lazy loading
* Minimal performance impact
* CDN-friendly architecture
* Optimized for WordPress
๐ Developer Friendly
* Clean, semantic HTML output
* Extensive hooks and filters
* Translation ready (i18n)
* WordPress coding standards
Perfect for:
* Technical blogs and tutorials
* Documentation websites
* Code portfolios
* Educational content
* API documentation
* Developer resources
Technical Requirements
- WordPress 6.8 or higher
- PHP 8.2 or higher
- Modern browser with JavaScript enabled
- Recommended: 128MB+ PHP memory limit
- Recommended: gzip or Brotli compression enabled for static JavaScript on your web server
Why server compression matters:
The syntax-highlighting and diagram libraries are large when uncompressed (Shiki ~2.35 MB, Mermaid ~3.2 MB) but shrink dramatically when delivered with gzip or Brotli (Shiki ~302 KB, Mermaid ~908 KB). For the best front-end performance, ensure your web server compresses static JavaScript (for example mod_deflate/mod_brotli on Apache, or the gzip/brotli directives on nginx). Most managed hosts and CDNs enable this by default. The plugin adds a Tools → Site Health check that reports whether these bundles are actually being served compressed.
Support
For support, please visit the WordPress.org support forum for this plugin. Our team actively monitors and responds to support requests.
Before posting a support request:
* Check the FAQ section above for common questions
* Ensure you’re using the latest version of the plugin
* Include your WordPress and PHP versions in your support request
Feature Requests:
We welcome feature suggestions! Please post them in the support forum with detailed descriptions of your use case.
Source Code
This plugin uses build tools for development efficiency.
Compressed File Source Code:
* build/index.js: WordPress Block Editor integration code
* Source: blocks/markdown/src/ folder
* Build: npm run build
* assets/libs/shiki/shiki.min.js: Shiki syntax highlighter (self-contained bundle, no CDN)
* Source: scripts/vendor/shiki-entry.mjs
* Build: npm run vendor:shiki
Source Code Access:
* GitHub Repository: https://github.com/my-biz-dev/markdown-renderer-for-github
* License: GPL v2 or later
* Development Branch: main
Build Instructions:
1. Install Node.js 18+
2. Install dependencies with npm install
3. Build with npm run build
4. Run tests with npm run test
Developer Resources:
* Development Environment Setup: See CLAUDE.md and docs/DEVELOPMENT.md
* Contributing: See CONTRIBUTING.md
* Build Process Details: See BUILD.md
Third Party Services
This plugin operates entirely self-contained and does NOT use any external third-party services.
Complete Local Operation:
* All JavaScript libraries are bundled locally within the plugin
* Shiki syntax highlighter – served from your WordPress installation (no CDN)
* Mermaid diagram renderer – served from your WordPress installation (no CDN)
* Chart.js chart renderer – served from your WordPress installation (no CDN)
* No external API calls or network requests are made
Privacy & Security Benefits:
* No data is transmitted to external servers
* No tracking, analytics, or data collection
* No external dependencies that could compromise your site
* GDPR compliant by design
* Works offline and in closed networks
All functionality is fully self-contained within your WordPress installation with no external service dependencies.
Privacy
This plugin does not collect any personal data. All processing is done locally on your server.
Credits
- Syntax highlighting: Shiki
- Diagram rendering: Mermaid
- Chart rendering: Chart.js
- Markdown parsing: markdown-it
Developer Information
This section provides essential information for developers who want to extend or customize the plugin.
For complete API documentation, architecture diagrams, and customization examples, see:
Developer Documentation on GitHub
Available Hooks and Filters
Actions:
gfmr_metadata_saved– Fired when code block metadata is saved- Parameters:
$post_id(int),$metadata(array) - Use case: Sync metadata with external services, logging
- Parameters:
Filters:
-
gfmr_metadata_get_metadata– Filter retrieved metadata before use- Parameters:
$metadata(array),$post_id(int) - Use case: Custom language detection, metadata modification
- Parameters:
-
gfmr_schema_data– Filter Schema.org JSON-LD data before output- Parameters:
$schema(array),$post(WP_Post) - Use case: Add custom schema properties, author profiles
- Parameters:
PHP Constants
GFMR_PLUGIN_FILE– Plugin main file pathGFMR_SLUG– Plugin slug (‘markdown-renderer-for-github’)GFMR_URI– Plugin URLGFMR_PATH– Plugin directory pathGFMR_PLUGIN_PATH– Plugin directory name (relative)GFMR_PLUGIN_BASENAME– Plugin basenameGFMR_ASSETS_PATH– Assets directory URL
JavaScript Global Objects
wpGfmConfig– Plugin configuration objectwpGfmRenderer– Core rendering API (processCodeBlocks, renderContent, initialize)wpGfmHighlighter– Highlighter wrapper instancewpGfmShikiHighlighter– Actual Shiki highlighter instancewpGfmUnifiedHighlight(code, lang, options)– Unified highlight functionwpGfmSwitchTheme(newTheme)– Theme switching function (‘light’, ‘dark’, ‘system’)wpGfmRenderDiagram(content, element, options)– Diagram rendering function
Settings Option
Option name: gfmr_theme_settings
Available keys:
theme– Theme setting (‘light’, ‘dark’, ‘system’)schema_enabled– Enable Schema.org JSON-LD output (bool)schema_auto_detect_type– Auto-detect article type (bool)schema_include_author– Include author in schema (bool)schema_include_publisher– Include publisher in schema (bool)
Plugin Development
This plugin follows WordPress coding standards and provides clean, semantic HTML output.
Detailed Documentation:
For complete documentation including full API reference with code examples, architecture diagrams (Mermaid), step-by-step customization guides, and CSS class reference, visit:
Blocks
This plugin provides 1 block.
- Markdown Write in GitHub Flavored Markdown with real-time preview.
Installation
- Upload the plugin files to the
/wp-content/plugins/markdown-renderer-for-githubdirectory, or install the plugin through the WordPress plugins screen directly. - Activate the plugin through the ‘Plugins’ screen in WordPress.
- Start using the Markdown block in the Gutenberg editor, or wrap your content with
[gfm-renderer]shortcode.
FAQ
-
What is GitHub Flavored Markdown?
-
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.
-
Which programming languages are supported for syntax highlighting?
-
GitHub Flavored Markdown Renderer supports 100+ programming languages including JavaScript, Python, PHP, Java, C++, HTML, CSS, SQL, and many more. The highlighting is powered by Shiki, the same engine used by VS Code.
-
Can I create diagrams with this plugin?
-
Yes! You can create beautiful diagrams using Mermaid syntax, including:
* Flowcharts
* Sequence diagrams
* Class diagrams
* State diagrams
* Gantt charts
* And more -
Can I create charts with this plugin?
-
Yes! You can create interactive charts using Chart.js with simple JSON configuration. Supported chart types
include:
* Line and Bar charts
* Pie and Doughnut charts
* Scatter, Bubble, Radar, and Polar Area chartsSimply use a “`chart fenced code block with your chart configuration in JSON format.
-
Is the plugin mobile-friendly?
-
Absolutely! All features including syntax highlighting, diagrams, and the copy button work perfectly on mobile devices.
-
Does this affect my site’s performance?
-
GitHub Flavored Markdown Renderer is designed for minimal performance impact with smart asset lazy loading and optimized code. Assets are only loaded when needed, and the plugin adds less than 100KB to your site.
-
Can I customize the appearance?
-
Yes, the plugin provides CSS variables and hooks for customization. You can easily match your theme’s design.
-
Is it translation ready?
-
Yes, the plugin is fully internationalized and translation ready. Japanese translation is included.
-
How do I add Markdown content?
-
You can use the dedicated “Markdown” block in the Gutenberg editor, or wrap your content with the
[gfm-renderer]shortcode in classic editor. -
Do I need coding knowledge to use this plugin?
-
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.
-
Will this work with my theme?
-
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.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“Markdown Renderer for GitHub” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Markdown Renderer for GitHub” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
2.8.0
- live Mermaid bg color and concurrent chart rendering
- Add cross-session diagram cache with localStorage persistence
- Add SVN trunk cleanup script for stray readiness-results
- scan clean dist in plugin-check instead of dev tree
- Add shared concurrent-load guard for editor diagram libraries
- add non-interactive mode and reduce log noise
- Add bounded render cache helper and skip rendered Mermaid blocks
- Show friendly notice for PlantUML suppressed diagrams
- Add server-side Mermaid rendering via Kroki
- add configurable PlantUML server URL
- ใชใชใผในๆใซ wakalab-site ใธๅๆใใชใฌใผใ้ไฟก
- Add per-language SEO meta description feature
- Add interactive diagram toolbar with expand and collapse
- add clipboard image paste with media upload
- adaptive debounce + PlantUML completeness guard
- skip redundant builds and vendor reinstalls
- render baked Mermaid diagrams and code blocks in prerendered content
- integrated-release STEP 3.4 ใฎๆง roadmap-update.yml ๅ็ งใ่งฃๆถ
2.7.17
- scope and time-box Plugin Check to prevent release hang
- isolate E2E compose project to stop release/CI smoke collision
2.7.16
- harden release smoke against transient nav timeouts
2.7.15
- add WordPress.org submission readiness check suite
- automate nightly plugin-check parallel diff (Phase 6-A)
- Reserve placeholder space to reduce CLS/FOUC
- load frontend styles non-render-blocking with critical CSS
- Exclude heavy diagram pages from prerender (WP7.0 spike)
- load Shiki grammars on demand per page languages
- add Site Health check for diagram bundle compression
- add Service Worker for long-term vendor caching
- extend diagram cache TTL to 30 days with version-keyed invalidation
- bake Chart.js into cached WebP/PNG images on render
- bake editor-rendered diagrams to skip frontend JS
- skip Mermaid renderer when diagrams are fully baked
- bake SVGs into eviction-proof post meta
- Offload Shiki highlighting to Web Worker
- Memoize editor Mermaid/Chart renders with source-keyed cache
- defer frontend scripts and schedule non-blocking init
- Lazy-load Shiki and Mermaid bundles on demand
- Chunk initial block rendering to reduce INP
- run setup-php release jobs on ubuntu-latest (fix native runner sudo loop)
- make wporg readiness tests resilient to missing jq/msgfmt
- check license.txt with correct lowercase name
- avoid set -e abort on (( count++ )) in cleanup_old_reports
- replace bash 4 mapfile in cache-cleanup PR job
- allow anonymous Mermaid SVG cache warming
- add bounded schema-aware cache keys
- make plugin check gate executable
- restrict baked data: URIs to base64 raster images
- harden baked data: URI handling against entity-encoded bypass
- Route worker init failure to main-thread highlighter
- Prevent readiness script abort from grep|head SIGPIPE under pipefail
- Treat undeterminable readiness values as warn, not false fail
