Skip to content

Technical Specifications - Markdown Renderer for GitHub

Detailed technical information and version specifications for the Markdown Renderer for GitHub plugin.

Core Information

ItemSpecification
Current Version1.7.1
LicenseGPL-2.0-or-later
PHP Requirement8.1 or higher
WordPress Requirement6.0 or higher
JavaScript EngineModern ES Modules

Technology Stack

The plugin is built with a hybrid architecture combining robust PHP backend processing with a dynamic JavaScript frontend.

Backend (PHP)

  • Controller: GFMR_Renderer (Singleton)
  • Asset Management: GFMR_Asset_Manager with smart feature detection
  • Metadata: Custom post meta (_gfmr_code_metadata) for optimized rendering
  • Cache: WordPress Transient API for performance

Frontend (JavaScript)

  • Core Engine: gfmr-core.js
  • Build Tool: @wordpress/scripts (based on Webpack/Vite)
  • Dynamic Loading: Intersection Observer for lazy-loading heavy libraries

Included Libraries

LibraryVersionPurpose
markdown-it14.1.0Core Markdown parsing
shiki1.xVS Code-grade syntax highlighting
mermaid10.xDiagram rendering (Flowcharts, etc.)
katex0.13+Mathematical formula rendering (LaTeX)

Performance Architecture

The plugin is designed with a "vibrant performance" approach:

  1. Selective Loading: Assets are only enqueued if specific features (like code blocks or Mermaid diagrams) are detected in the post content.
  2. Lazy Rendering: Heavy libraries like Shiki and Mermaid are loaded asynchronously and only when needed.
  3. Optimized Metadata: Code block metadata is pre-calculated on post save to reduce frontend processing time.
  4. Caching: Rendered assets and feature detection results are cached using WordPress transients.

Development Workflow

  • Testing: PHPUnit for backend, Playwright for E2E testing
  • Linting: PHPCS (WordPress Standards), ESLint, Stylelint
  • CI/CD: GitHub Actions for automated testing and transparency