| 开发者 | cck23 |
|---|---|
| 更新时间 | 2026年11月7日 11:05 |
| PHP版本: | 8.2 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
meta), and existing custom taxonomies (taxonomies). Marklane does not create new custom field definitions or taxonomy structures.
Update existing posts: Re-import a Markdown file to update its matching WordPress post. Dry Run shows the planned action, taxonomy and image resolution, warnings, and errors before saving.
Keep Markdown as your source: local files chosen or dropped into Marklane are not stored in the Media Library. Use Select from Media Library to upload and retain the original file in WordPress. Supporting images uploaded with Markdown are saved without their folder structure.
Marklane also supports relative images, Polylang language links, and optional Mermaid, callout, and display-math rendering. Plain Markdown without frontmatter can create a draft post.
For setup, examples, and supported frontmatter values, see the Marklane guide.
Best suited for:
Plugins > Add New.Marklane.Install Now, then activate the plugin.Tools > Marklane./wp-content/plugins/ and activate it from the Plugins screen.Yes. Select multiple .md files and run Dry Run or Import. Marklane reports the result for each file. The default limit is 50 Markdown files per request, and each file can be up to 5 MiB.
You can set values such as:
titleslugpostTypeexcerptstatusdatecategorytagsmeta (supported custom fields)taxonomies (existing custom taxonomies)featuredImagelangtranslationspostType defaults to post. Public registered post types are allowed by default, except attachments. Site-specific overrides can be applied with the marklane_whitelist filter.
If title is omitted, Marklane uses the first H1 and then the filename. If slug is omitted, Marklane derives it from the filename.
The meta field accepts permitted keys with strings, numbers, booleans, or one-dimensional string arrays. The taxonomies field assigns terms in existing eligible taxonomies. Marklane does not create custom field definitions or new custom taxonomies.
Yes.
The plugin matches an existing post by slug + post_type, or by slug + post_type + lang when Polylang is in use.
Dry Run shows the planned action before saving anything, including:
featuredImage resolutionFor a Markdown file selected from Media Library, relative image paths first look for Media Library images in that attachment's directory. Local Markdown imports have no saved Markdown attachment: image resolution uses the expected WordPress uploads location and falls back to matching basenames across uploads and the Media Library.
When Markdown and supporting images are uploaded together, the supporting images are stored as flat Media Library files, so nested folder paths are not preserved.
The featuredImage frontmatter field follows the same rule and sets the post thumbnail when the target image is already registered in the Media Library. If FIFU is active, featuredImage can also point to an external URL.
For more predictable results, use fully unique filenames and, if possible, disable WordPress's year/month based upload folders before uploading the Markdown file and related images. This is recommended, not required; basename fallback can still resolve images when year/month folders are enabled.
Yes. Marklane keeps league/commonmark as the Markdown converter and uses strict CommonMark behavior by default. If your Japanese writing workflow needs text such as **「text」**続き to render as strong text, enable the CJK compatibility pass:
add_filter('marklane_enable_markdown_compatibility_preprocessing', '__return_true');
Advanced sites can replace the matching pattern with the marklane_markdown_compatibility_strong_boundary_pattern filter. For example, use a custom pattern for Japanese quoted text followed by a letter or number.
Yes, optionally.
Enable Mermaid rendering from Tools > Marklane, and Marklane will load the bundled Mermaid renderer only on front-end pages that contain language-mermaid code blocks. The renderer uses the locally bundled official Mermaid ESM runtime and loads diagram chunks on demand. The post content is still stored as a normal fenced code block, so disabling the option simply returns the front end to plain code blocks.
Yes, optionally.
Enable Extended Markdown from Tools > Marklane, and Marklane will render common callout syntax such as GitHub / Obsidian / GitLab blockquote alerts. Zenn / Docusaurus / Quarto ::: callouts are normalized during import, then enhanced on the front end. :::details is rendered as a native collapsible details element without JavaScript. External embed syntax such as tweets, cards, or videos is not expanded. Advanced sites can limit enabled normalization profiles with the marklane_extended_markdown_profiles filter.
Yes, optionally. Enable Math rendering from Tools > Marklane, and Marklane will render display formulas written as $$...$$ only on front-end pages that contain math blocks. Inline math is not expanded. Under the hood, Marklane converts formulas to browser-native MathML with a bundled local renderer.
Yes. Your theme can customize callouts, Mermaid diagrams, and math blocks using CSS. Callout colors can also be customized with variables such as --marklane-callout-color-note.
For styling examples and more information, see the Marklane official guide.
Yes. Marklane is completely free, and all features are available without payment. If you find it useful, you can optionally support its development on GitHub Sponsors.
Yes.
When Polylang is active, you can use lang and translations in frontmatter to connect translated posts.
meta fields while importing other content.