php-collective/wp-djot
Composer 安装命令:
composer require php-collective/wp-djot
包简介
WordPress plugin for Djot markup language support
README 文档
README
A WordPress plugin for Djot markup language support. Convert Djot syntax to HTML in posts, pages, and comments.
What is Djot?
Djot is a light markup syntax created by John MacFarlane (creator of CommonMark and Pandoc). It aims to be a successor to Markdown with cleaner syntax and more consistent parsing rules.
Features
- Full Djot Support: Headings, emphasis, links, images, code blocks, tables, footnotes, and more
- Block Editor Support: Native Gutenberg block for writing Djot with live preview
- Shortcode Support: Use
[djot]...[/djot]in your content - Table of Contents: Automatic TOC generation from headings with configurable levels and position
- Heading Permalinks: Clickable
#symbols on headings (show on hover, copy URL to clipboard) - Content Profiles: Configurable feature restrictions (full, article, comment, minimal)
- Safe Mode: XSS protection for untrusted content
- Syntax Highlighting: Server-side highlighting with Torchlight Engine
- Code Block Enhancements: Line numbers and line highlighting (VitePress-style syntax)
- WP-CLI Migration: Migrate existing HTML/Markdown content to Djot
Example
# Welcome to My Blog
This is _emphasized_ and this is *strong*.
Here's a [link to Djot](https://djot.net/) and some `inline code`.
- First item
- Second item
- Third item
> A blockquote with some wisdom.
And a code block:
``` php
<?php
echo "Hello, World!";
```
Renders as:
Welcome to My Blog
This is emphasized and this is strong.
Here's a link to Djot and some
inline code.
- First item
- Second item
- Third item
A blockquote with some wisdom.
<?php echo "Hello, World!";
Requirements
- PHP 8.2 or higher
- WordPress 6.0 or higher
Installation
From WordPress.org
Search for "Djot Markup" in the WordPress plugin directory, or visit: wordpress.org/plugins/djot-markup
From GitHub
cd wp-content/plugins git clone https://github.com/php-collective/wp-djot.git cd wp-djot composer install --no-dev
Documentation
- Usage & Configuration - Getting started guide
- Content Profiles - Configure feature restrictions
- Customization - Custom patterns, @mentions, render handlers
- WP-CLI Commands - Migrate existing content
- Hooks and Filters - Customize plugin behavior
- Djot Syntax - Quick reference
For complete Djot syntax documentation, visit djot.net.
See Also
- Djot - Official Djot website with syntax reference and playground
- jgm/djot - Reference implementation in JavaScript by John MacFarlane
- JetBrains IDE support - Plugin for PhpStorm, IntelliJ IDEA, WebStorm, etc.
- Djot playground - Live demo to check out how this markup language works.
Credits
- djot-php by PHP Collective
- Torchlight Engine for syntax highlighting
- djot-grammars for Djot syntax highlighting in code blocks
Changelog
See CHANGELOG.md for version history.
php-collective/wp-djot 适用场景与选型建议
php-collective/wp-djot 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 11 月 30 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 php-collective/wp-djot 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 php-collective/wp-djot 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 14
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-11-30