Skip to content

Support for WordPress WXR-style comment-based shortcodes and custom handling #19

@vadimkantorov

Description

@vadimkantorov

Initial checklist

Problem

These are WordPress export format (*.wxr) style shortcodes occur in exported HTML/XML. They are used for exporting some more precise info about standard blocks like wp:heading, but also for any custom blocks (e.g. some sorts of image galleries - for these blocks, some custom handling can be needed, e.g. to load the list of images from another exported JSON file and add it to the output).

<!-- wp:someshortcode {"some": "json, params"} -->
... some html or xml...
<!--/wp:someshortcode -->

or <!-- wp:someshortcode {"some": "json, params"} /-->

It's useful to be able to preserve the JSON-params of the standard/frequent blocks like wp:heading, and allow some custom processing/preservation of custom blocks.

This flow is important for content migration of WordPress's WXR -> more modern markdown remark/rehype-based static engines like Astro

Current solutions

Current solution would be to pre-process manually the these shortcodes in XML, and then use rehype to convert to Markdown format

Proposed solutions

Some built-in support for handlers of such format of WordPress-like shortcodes

Metadata

Metadata

Assignees

No one assigned

    Labels

    👎 phase/noPost cannot or will not be acted on🙅 no/wontfixThis is not (enough of) an issue for this project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions