=== Markdown Renderer for GitHub === Contributors: wakalab Donate link: https://wakalab.dev/ Tags: markdown, github, gfm, syntax-highlighting, mermaid Requires at least: 6.5 Tested up to: 6.9 Requires PHP: 8.1 Stable tag: 2.0.2 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Transform your WordPress content with beautiful GitHub Flavored Markdown rendering, syntax highlighting, and interactive diagrams. == 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 ✨ **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 == Installation == 1. Upload the plugin files to the `/wp-content/plugins/markdown-renderer-for-github` directory, or install the plugin through the WordPress plugins screen directly. 2. Activate the plugin through the 'Plugins' screen in WordPress. 3. Start using the Markdown block in the Gutenberg editor, or wrap your content with `[gfm-renderer]` shortcode. == Frequently Asked Questions == = 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 = 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. == Screenshots == 1. **Gutenberg Block Integration** - Easy-to-use Markdown block in the WordPress block editor with live preview 2. **Beautiful Syntax Highlighting** - Professional code presentation with copy button functionality and 100+ language support 3. **Interactive Mermaid Diagrams** - Create flowcharts, sequence diagrams, and more with zoom functionality 4. **GitHub-Style Tables & Formatting** - Perfect rendering of tables, task lists, and other GFM features 5. **Mobile-Responsive Design** - All features work seamlessly across desktop, tablet, and mobile devices 6. **Admin Settings** - Simple configuration options for themes and performance optimization == Changelog == = 2.0.2 = * Improve PHPDoc for main renderer class = 2.0.1 = * Prevent Pro source code leak in WordPress.org packages = 1.16.0 = * Pro版プラグインのライセンス管理UIと初期化フロー修正 * Add Pro version plugin implementation with assets and features * Use script handle instead of file path in block.json * Use script handle instead of file path in block.json * Fix translation JSON hash and domain mismatch * Fix translation JSON source field mismatch * Add dynamic language path resolution for Pro version * Replace Japanese comments with English in block registry * Add comprehensive i18n workflow documentation * Add comprehensive i18n workflow documentation * Add source field troubleshooting to i18n documentation * Add i18n translation skill and Pro version language file * Add E2E tests for Gutenberg block translations * Eliminate Pro/Free version core code duplication * Activate Frontmatter Settings translations in Japanese * Add JED format JSON for Frontmatter Settings translations * Add automated translation hash fix script * Update Pro roadmap status for v2.0.0 release = 1.16.0 = * [Pro] Standalone mode: Pro version now works independently without requiring Free version * [Pro] Automatic conflict detection and Free version deactivation * [Pro] License recheck function with rate limiting and backoff strategy * [Pro] Server-side feature guard system for Pro features * [Pro] Enhanced license management with improved error handling * [Pro] Architecture: Embedded Free version core for standalone operation * [Pro] License validation: Improved caching and grace period handling * [Pro] Created `includes/core/` with 15 Free version core files * [Pro] Copied `assets/` and `blocks/` directories to Pro version * [Pro] Added `SYNC_LOG.md` for tracking Free→Pro synchronization * [Pro] Implemented `GFMR_Pro_Conflict_Detector` class * [Pro] Updated bootstrap with `init_standalone()` method = 1.15.0 = * Add Pro version packaging script * Separate Pro plugin and enhance extension system * Add automatic cleanup of release ZIP files = 1.14.1 = * Clean up and optimize npm scripts * Add npm test alias for test:quick * Preserve cursor position during image insertion * Update changelog for cursor position fix * Add comprehensive test suite for hasMathContent detection = 1.14.0 = * Optimize test execution time and fix WordPress tests * improve code quality and PHPCS compliance * Fix security audit script errors * Replace non-existent WordPress-Security with WordPress-Extra * Remove visual empty lines in diff code blocks on frontend * Update prefix policy backward compatibility note * Add comprehensive unit tests for applyDiffHighlighting = 1.13.0 = * Add JSX support to babel.config.js for wp-scripts build = 1.12.0 = * Add tabbed navigation to settings page * Add Japanese translations for TOC settings page * Fix TOC sidebar positioning with Flexbox layout * Fix TOC heading indentation hierarchy * Handle undefined security-tests result in CI summary * Make security tests optional in CI pipeline * Remove invalid continue-on-error from reusable workflow job * Update changelog for TOC i18n changes * Add JavaScript unit tests for coverage improvement * Add comprehensive unit tests for TOC, frontmatter, and settings * Exclude development files from highlight.php in distribution package * Add coverage-js to gitignore = 1.11.1 = * Fix Rust syntax highlighting across editor and language detection = 1.11.0 = * Add -y/--yes flag for non-interactive deployment * Add Mermaid diagram lightbox with zoom and pan * Add deployment best practices and troubleshooting = 1.10.3 = * Fix undefined GFMR_PLUGIN_DIR constant causing production failure * Include production vendor dependencies in release package * Add GFMR_PATH to PHPStan baseline * Remove duplicate changelog entries * Add v1.10.1 changelog entries * Update v1.10.2 changelog = 1.10.2 = * Fix undefined GFMR_PLUGIN_DIR constant causing production failure * Include production vendor dependencies (highlight.php) in release package * Add GFMR_PATH to PHPStan baseline = 1.10.0 = * Add server-side rendering (SSR) for code blocks and Mermaid diagrams * Fix editor preview display for code blocks and Mermaid diagrams * Enhance CSS specificity documentation and deprecated version migration strategy = 1.9.1 = * Add YAML frontmatter display feature with settings * Remove redundant type checks to satisfy PHPStan * Update Linear project name in CLAUDE.md * Enable frontend-design plugin * Disable frontend-design plugin = 1.9.0 = * Implement Pro roadmap automation system * Optimize GitHub Actions performance for PR execution * Add safe error handling for feature.title field access = 1.8.0 = * Implement Pro license management system with Lemon Squeezy integration * Add missing Mermaid diagram types to content-based detection * Relax graph/flowchart regex and add missing Mermaid diagram types * Add dark mode background color tests for Shiki code blocks * Add preToolUse hook for automatic lint fix before git operations = 1.7.14 = * Implement shiki theme persistence and rendering optimization * Consolidate WordPress function stubs and unify test bootstrap = 1.7.13 = * Add automatic changelog sync from changelog.txt to readme.txt * WordPress互換性テストスイートを共通ライブラリで統合 * Resolve code highlighting rendering issues with theme mismatch = 1.7.12 = * PHPCSに加えてPHPStanを導入 * Implement WordPress.org compatibility auto-update * Add memory limit to PHPStan commands in scripts == Upgrade Notice == = 1.7.0 = Added i18n workflow for translate.wordpress.org and fixed Mermaid User Journey rendering in editor. = 1.6.0 = Improved WordPress.org compliance and internationalization support. All users are recommended to upgrade. = 1.5.0 = New Mermaid State Diagram support and JavaScript UI translation integration. = 1.4.0 = Schema.org structured data support and improved rendering performance. = 1.0.0 = First official release with GitHub Flavored Markdown rendering. == Technical Requirements == * WordPress 6.0 or higher * PHP 8.1 or higher * Modern browser with JavaScript enabled * Recommended: 128MB+ PHP memory limit == 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 **Source Code Access:** * **GitHub Repository**: https://github.com/wakalab/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) * 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](https://shiki.style/) * Diagram rendering: [Mermaid](https://mermaid.js.org/) * Markdown parsing: [markdown-it](https://markdown-it.github.io/) == 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](https://github.com/wakalab/markdown-renderer-for-github/tree/main/docs) = 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 **Filters:** * `gfmr_metadata_get_metadata` - Filter retrieved metadata before use * Parameters: `$metadata` (array), `$post_id` (int) * Use case: Custom language detection, metadata modification * `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 = PHP Constants = * `GFMR_PLUGIN_FILE` - Plugin main file path * `GFMR_SLUG` - Plugin slug ('markdown-renderer-for-github') * `GFMR_URI` - Plugin URL * `GFMR_PATH` - Plugin directory path * `GFMR_PLUGIN_PATH` - Plugin directory name (relative) * `GFMR_PLUGIN_BASENAME` - Plugin basename * `GFMR_ASSETS_PATH` - Assets directory URL = JavaScript Global Objects = * `wpGfmConfig` - Plugin configuration object * `wpGfmRenderer` - Core rendering API (processCodeBlocks, renderContent, initialize) * `wpGfmHighlighter` - Highlighter wrapper instance * `wpGfmShikiHighlighter` - Actual Shiki highlighter instance * `wpGfmUnifiedHighlight(code, lang, options)` - Unified highlight function * `wpGfmSwitchTheme(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: [GitHub Developer Documentation](https://github.com/wakalab/markdown-renderer-for-github/tree/main/docs)