WordPress Plugin

Marklane

Marklane lets you publish and update Markdown drafts directly in WordPress. Post details, images, diagrams, math, and notices can all stay with your Markdown source.

Marklane logo showing a Markdown file being imported into WordPress

Key features

  • Upload `.md` files directly

    Upload a Markdown file from the WordPress admin, or select an existing Markdown attachment from the Media Library and import it as a post.

  • Check results with Dry Run

    Before saving, you can review whether the import will create or update a post, which post was matched, and how taxonomies and images will be handled.

  • Re-import existing posts

    Existing posts can be matched and updated by `slug + post_type`. When Polylang is active, the language code is included in the match.

  • Works with multilingual setups

    When Polylang is active, `lang` and `translations` can be used to link language-specific posts.

  • Map post data through frontmatter

    Titles, slugs, excerpts, dates, categories, tags, post status, featured images, and language links can be set through YAML frontmatter.

  • Resolve relative images and featured images

    Images stored alongside the Markdown source can be matched with existing Media Library items for both content images and `featuredImage`. External featured-image URLs can be used when the FIFU plugin is active.

  • Present diagrams, math, and notices clearly

    Mermaid diagrams, `$$...$$` math blocks, GitHub-style alerts, and Zenn-style messages can be displayed clearly without leaving the Markdown workflow. The required scripts and styles are loaded only on pages that use those features.

  • Import plain Markdown too

    If frontmatter is omitted, Marklane can still create a draft by deriving the title from the first H1 and the slug from the filename.

When it is a good fit

  • You want to turn local Markdown into WordPress posts

    You do not need to move back and forth between a Markdown editor and the WordPress editor to rebuild headings, images, and publishing details. Marklane lets you publish without opening the WordPress editor or copying and pasting content.

  • You want to re-import updated articles

    It works well when you revise the same source file and import it again to update an existing post.

  • You want the Markdown source to stay visible in WordPress

    The uploaded `.md` file stays attached to the imported post, which makes it easier to find and re-import the same source later.

  • You want diagrams and formulas to stay in Markdown

    ` ```mermaid ` diagrams, `$$...$$` formulas, and notices such as `[!NOTE]` can stay readable in Markdown while being presented clearly on the published page.

Support for extended Markdown syntax

The scripts and styles needed for Mermaid diagrams and notices are loaded only on pages that use those features, avoiding unnecessary overhead elsewhere.

Mermaid

Marklane supports rendering diagrams written with Mermaid syntax.

Markdown

```mermaid
flowchart LR
  A[Write Markdown] --> B[Import with Marklane]
  B --> C[Publish in WordPress]
```

Published page

GitHub-style notice

GitHub-style notices are displayed with a clear design that matches their purpose.

Markdown

> [!NOTE]
> Use Dry Run to review the post before publishing.

Published page

Note

Use Dry Run to review the post before publishing.

Zenn-style message

Zenn message syntax becomes a clear warning on the published page.

Markdown

:::message alert
Check your backup before publishing.
:::

Published page

Warning

Check your backup before publishing.

Math

Display math wrapped in `$$...$$` is rendered with browser-native MathML.

Markdown

$$
E = mc^2
$$

Published page

E = m c 2

Screenshot

Marklane WordPress admin screen with Markdown upload, related image selection, post status options, Dry Run, and Import controls
Choose a Markdown file and related images, check the result with Dry Run, then create or update the post.

Compatibility

  • Distribution page

    Check the WordPress.org listing for the latest version number and release status.

  • WordPress

    Works on WordPress 5.6 or later.

  • PHP

    Works on PHP 8.0 or later.

What you can set with frontmatter

Add frontmatter to the beginning of your Markdown file to define WordPress publishing settings. Titles, slugs, taxonomies, language information, and other post settings can be applied together without opening the WordPress editor.

  • Required fields

    `title` and `slug` can be supplied in frontmatter, but Marklane can derive them from the first H1 and filename when they are omitted.

  • Basic post settings

    `postType`, `status`, and `excerpt` can be used for post type, publication status, and excerpts.

  • Taxonomies and featured image

    `category` and `tags` can assign taxonomy terms. `featuredImage` accepts either a Media Library URL or a relative path from the Markdown file.

  • Multilingual fields

    `lang` defines the post language, and `translations` points to the slugs of related posts in other languages.

YAML frontmatter example

---
title: "Moonlit Garden Notes" # Optional / post title
slug: "moonlit-garden-notes" # Optional / base slug for the post URL
postType: "post" # Optional / post type
featuredImage: "./hero.jpg" # Optional / featured image
lang: "en" # Optional / Polylang post language
translations:
  ja: "yoru-no-niwa-no-kansatsu-kiroku" # Optional / related Japanese post slug
category:
  - "journal" # Optional / category taxonomy
  - "garden"
tags:
  - "seasonal-notes" # Optional / post_tag taxonomy
  - "greenhouse"
excerpt: "A short note from a weekend walk through the greenhouse and garden." # Optional / excerpt
status: "draft" # Optional / post status
---

![Greenhouse photo](./hero.jpg)

YAML frontmatter keeps post settings together with the Markdown source. If frontmatter is omitted, Marklane can still create a draft from the filename and first H1.

Installation

  1. In the WordPress admin, go to `Plugins > Add New` and search for `Marklane`.
  2. Activate `Marklane`.
  3. Open `Tools > Marklane` and upload a Markdown file or select one from the Media Library.
  4. Run Dry Run to preview the result, then run Import to create or update the post.

For manual installation, upload the plugin folder to `/wp-content/plugins/` and activate it from the WordPress `Plugins` screen.

Common questions

  • How does it decide whether to update an existing post?

    It matches existing posts by `slug + post_type`, or by `slug + post_type + lang` when Polylang is active.

  • What does Dry Run show?

    Dry Run shows whether the import will create or update a post, which post was matched, how taxonomies and images will be handled, and whether any warnings or errors were raised.

  • Which frontmatter fields are required?

    `title` and `slug` can be set explicitly, but they can also be derived from the first H1 and filename. Fields such as `postType`, `status`, and `category` can be added as needed.

  • Can it update existing posts?

    Yes. It looks up existing posts by `slug + post_type`, or by `slug + post_type + lang` when Polylang is active.

  • Does it import images into WordPress automatically?

    No. Relative image paths are resolved against Media Library attachments. Supporting images uploaded together are stored as flat Media Library files, so nested paths such as `images/foo.jpg` are not recreated.

  • Can I use an external URL for `featuredImage`?

    Yes, when FIFU is active. Without FIFU, `featuredImage` must resolve to an existing Media Library attachment.

  • Can it import multiple files at once?

    Not at the moment. The current workflow is built around importing one `.md` file at a time.

  • Can it render Mermaid diagrams?

    Yes. When the setting is enabled in `Tools > Marklane`, Marklane loads the scripts needed to display diagrams only on published pages that contain `language-mermaid` code blocks. The stored content remains a normal Markdown code block.

  • Can it render math and notices?

    Yes. `$$...$$` math blocks, GitHub-style alerts, and Zenn-style messages can be displayed through optional settings. The required scripts and styles are loaded only on pages that use those features.

  • Can I enable compatibility behavior for Japanese strong emphasis?

    Yes. Strict CommonMark behavior is the default, but a compatibility preprocessing filter can be enabled for Japanese writing patterns such as `**「text」**continued`.

Notes

  • Use unique filenames for Markdown files and image assets to avoid ambiguous image mapping.
  • If you use relative image paths, the matching images need to be registered in the Media Library first.
  • For predictable image matching, disabling WordPress year/month upload folders is recommended.
  • ZIP imports, REST API imports, WP-CLI imports, and automatic downloading of external images are out of scope.

Recent changes

  • 1.6.0

    Added support for GitHub-style alerts, Zenn-style messages, and `$$...$$` math rendering.

  • 1.5.1

    Improved the Mermaid-related settings UI and release package.

  • 1.5.0

    Added diagram rendering for Mermaid code blocks on published pages.

  • 1.4.8

    Lowered the minimum supported PHP version to 8.0.

  • 1.4.7

    Improved WordPress.org compliance in the admin screen and the upload cleanup flow.

  • 1.4.6

    Added a dedicated short description for the WordPress.org plugin listing.

  • 1.4.5

    Added in-admin links to the official page and frontmatter examples, and made temporary upload-cache cleanup more reliable.

  • 1.4.4

    Strengthened supporting-image upload validation and adjusted the default behavior for public post-type imports.

  • 1.4.3

    Improved MIME detection for Markdown uploads and raised the PHP requirement to 8.1 or later.

  • 1.4.1

    Improved existing-post lookup with Polylang and allowed selecting Markdown files together with supporting images from the Media Library.

Check WordPress.org for the latest version number and full release history.