Marklane 2.0: Batch Markdown Imports and Custom Fields for WordPress

Marklane 2.0: Batch Markdown Imports and Custom Fields for WordPress

Version 2.0 of Marklane, my Markdown importer for WordPress, is out.

The biggest addition is batch importing: you can now select several Markdown files and import them together. Version 2.0 also supports assigning supported custom fields and existing custom taxonomies through YAML frontmatter.

For anyone keeping their articles in Markdown and Git, it makes publishing updates to WordPress much less repetitive.

Import multiple Markdown files at once

Previously, updating several articles meant selecting and importing each Markdown file separately. With 2.0, you can select multiple files and run a Dry Run or an import in one operation.

Marklane shows the result for each file. If one file fails, processing generally continues for the others.

This is especially useful when you have made changes to several articles in a Git repository. You can still manage each article as a separate Markdown file, then send the updates to WordPress together.

By default, a request can contain up to 50 Markdown files, with a 5 MiB limit per file.

Set custom fields and taxonomies in frontmatter

Alongside familiar fields such as the title, slug, categories, and tags, version 2.0 can import supported custom-field values and terms for existing custom taxonomies.

For example:

---
title: "Sample post"
slug: "sample-post"
status: "draft"
category:
  - "technology"
tags:
  - "WordPress"
meta:
  reading_time: 5
taxonomies:
  topic:
    - "tutorial"
---

The meta field accepts permitted keys and supported values, including strings, numbers, and booleans. The taxonomies field assigns terms to eligible custom taxonomies already registered in WordPress.

Marklane does not create custom-field definitions or register new taxonomies. The example reading_time field and topic taxonomy are illustrative; the site must be configured to support them.

Preview imports with Dry Run

Batch operations make it particularly useful to see what will happen before saving anything.

Marklane's Dry Run reports planned post creation or updates, taxonomy assignments, image resolution, warnings, and errors. In version 2.0, the results are displayed separately for each file, making it easier to spot a problematic article before proceeding.

You can also preview an update to an existing post before running the actual import.

Rendering and dependency updates

The release includes several other changes:

  • Callouts now use a design closer to GitHub Alerts.
  • Mermaid is updated to version 12, with fewer bundled files to reduce distribution size.
  • The YAML parser is updated to the Symfony 7.4 LTS series.

Mermaid and callout rendering remain optional features.

Check requirements before updating

Version 2.0 raises the minimum requirements to:

  • WordPress 6.4 or later
  • PHP 8.2 or later

If your server still runs PHP 8.1 or earlier, you will need to upgrade PHP before updating Marklane.

Markdown files selected locally are not normally retained in the WordPress Media Library. If you want to keep the source file there, upload and select it through the Media Library instead.

Keep Markdown as your source of truth

I built Marklane because I wanted to manage articles in Git as Markdown and publish them to WordPress without repeatedly editing posts by hand. That goal has not changed.

The batch import and custom field features were originally built for an unreleased paid edition, and I had been using them myself. Rather than releasing that edition, I decided to include those features in the free plugin.

If you want to keep your existing WordPress site while separating writing and source management from publishing, Marklane may fit your workflow.

I also wrote about why I built Marklane in an earlier post.

If you'd like to support continued development, you can do so through GitHub Sponsors.

Related Posts:

Comments

Leave a comment

Your email address will not be published. Required fields are marked.

Prove your humanity: 3   +   4   =