Enhancement: Support Asciidoc as the content body, similar to current Markdown support. #657

Closed
opened 2026-10-05 02:58:52 +02:00 by adam · 16 comments
Owner

Is your feature request related to a problem? Please describe.

I use structured data in frontmatter to define the page layout, but I have content 'blocks' in the design that use the 'body' content of the AsciiDoc file. I have linked to a simple example file below showing some frontmatter and AsciiDoc content.

Describe the solution you'd like

Do what you do for Markdown support, but for the AsciiDoc format too.

Describe alternatives you've considered

I considered just using Markdown, but it supports a minimal subset of the features in AsciiDoc that I need to use for my technical documentation content.

Additional context

AsciiDoc has a very similar syntax to Markdown.

You can use asciidoctor.js for content preview.

Example file with a single design block defined in the front matter called 'content', that injects the AsciiDoc content below front matter into that part of the page. Here is the final rendering of that page on the site. https://www.thegooddocsproject.dev/about

**Is your feature request related to a problem? Please describe.** I use structured data in frontmatter to define the page layout, but I have content 'blocks' in the design that use the 'body' content of the AsciiDoc file. I have linked to a simple example file below showing some frontmatter and AsciiDoc content. **Describe the solution you'd like** Do what you do for Markdown support, but for the AsciiDoc format too. **Describe alternatives you've considered** I considered just using Markdown, but it supports a minimal subset of the features in AsciiDoc that I need to use for my technical documentation content. **Additional context** [AsciiDoc has a very similar syntax to Markdown](https://docs.asciidoctor.org/asciidoc/latest/asciidoc-vs-markdown/). You can use [asciidoctor.js](https://docs.asciidoctor.org/asciidoctor.js/latest/) for content preview. [Example file](https://gitlab.com/tgdp/www/-/blob/main/src/content/about.adoc?ref_type=heads&plain=1) with a single design block defined in the front matter called 'content', that injects the AsciiDoc content below front matter into that part of the page. Here is the final rendering of that page on the site. https://www.thegooddocsproject.dev/about <!-- github-sync-id:2426454693 -->
adam closed this issue 2026-10-05 02:58:52 +02:00
Author
Owner

Thanks @zivbk1 for this suggestion, I'll take a look into it.

Thanks @zivbk1 for this suggestion, I'll take a look into it. <!-- github-comment-id:2247547051 -->
Author
Owner

This will be helpful for at least 3 projects I am working on now that have migrated from Markdown to AsciiDoc for long-form content.

This will be helpful for at least 3 projects I am working on now that have migrated from Markdown to AsciiDoc for long-form content. <!-- github-comment-id:2261546107 -->
Author
Owner

I looked into it and tried to see what is possible with FM without any code change. In my test project, I used the following configuration:

{
  "$schema": "https://beta.frontmatter.codes/frontmatter.schema.json",
  "frontMatter.content.supportedFileTypes": [
    "md",
    "mdx",
    "markdown",
    "adoc"
  ],
  "frontMatter.content.pageFolders": [{
    "title": "AsciiDoc",
    "path": "[[workspace]]/content/asciidoc",
    "contentTypes": ["AsciiDoc"]
  }],
  "frontMatter.taxonomy.contentTypes": [{
    "name": "AsciiDoc",
    "pageBundle": false,
    "fileType": "adoc",
    "fields": [{
        "title": "Default title",
        "name": "title",
        "type": "string"
      },
      {
        "title": "Layout",
        "name": "layout",
        "type": "string"
      },
      {
        "title": "Blocks",
        "name": "blocks",
        "type": "block",
        "fieldGroup": [
          "AsciiDoc"
        ]
      }
    ]
  }],
  "frontMatter.taxonomy.fieldGroups": [{
    "id": "AsciiDoc",
    "labelField": "title",
    "fields": [{
        "title": "Title",
        "name": "title",
        "type": "string",
        "single": true
      },
      {
        "title": "Block ref",
        "name": "block_ref",
        "type": "string",
        "single": true
      }
    ]
  }]
}

This allows you to change the front matter in your adoc file.

image

What are exactly the improvements you are looking for that FM needs to support for AsciiDoc?

I looked into it and tried to see what is possible with FM without any code change. In my test project, I used the following configuration: ```json { "$schema": "https://beta.frontmatter.codes/frontmatter.schema.json", "frontMatter.content.supportedFileTypes": [ "md", "mdx", "markdown", "adoc" ], "frontMatter.content.pageFolders": [{ "title": "AsciiDoc", "path": "[[workspace]]/content/asciidoc", "contentTypes": ["AsciiDoc"] }], "frontMatter.taxonomy.contentTypes": [{ "name": "AsciiDoc", "pageBundle": false, "fileType": "adoc", "fields": [{ "title": "Default title", "name": "title", "type": "string" }, { "title": "Layout", "name": "layout", "type": "string" }, { "title": "Blocks", "name": "blocks", "type": "block", "fieldGroup": [ "AsciiDoc" ] } ] }], "frontMatter.taxonomy.fieldGroups": [{ "id": "AsciiDoc", "labelField": "title", "fields": [{ "title": "Title", "name": "title", "type": "string", "single": true }, { "title": "Block ref", "name": "block_ref", "type": "string", "single": true } ] }] } ``` This allows you to change the front matter in your `adoc` file. ![image](https://github.com/user-attachments/assets/fdca7fba-727c-41f9-af32-69dca450a810) What are exactly the improvements you are looking for that FM needs to support for AsciiDoc? <!-- github-comment-id:2272910760 -->
Author
Owner

This is great! I think the only part missing now would be the WYSIWYG tools for things like headings, links, images, bold, italics, etc. that used slightly different syntax than Markdown. The hope is an equivalent editing experience, with snippets and all the other good stuff.

https://frontmatter.codes/docs/markdown

This is great! I think the only part missing now would be the WYSIWYG tools for things like headings, links, images, bold, italics, etc. that used slightly different syntax than Markdown. The hope is an equivalent editing experience, with snippets and all the other good stuff. https://frontmatter.codes/docs/markdown <!-- github-comment-id:2273628854 -->
Author
Owner

@bwklein I have included support for Asciidocs. When you add adoc to the supported file types, the WYSIWYG tools become available and their markers have been updated to match the Asciidoc markup.

Give it a try in the latest beta and let me know if anything needs to be changed.

@bwklein I have included support for Asciidocs. When you add `adoc` to the supported file types, the WYSIWYG tools become available and their markers have been updated to match the Asciidoc markup. Give it a try in the latest beta and let me know if anything needs to be changed. <!-- github-comment-id:2288942393 -->
Author
Owner

You are awesome! I am going to try this today on a new project.

You are awesome! I am going to try this today on a new project. <!-- github-comment-id:2289107203 -->
Author
Owner

Trying it out and have some feedback.

When I click the 'Other markup options' button I see a list like this.

image

It looks like labels and details are missing from various commands.

Trying it out and have some feedback. When I click the 'Other markup options' button I see a list like this. ![image](https://github.com/user-attachments/assets/16e835e0-4a26-40a3-944a-cd2b1de0d6ff) It looks like labels and details are missing from various commands. <!-- github-comment-id:2290148523 -->
Author
Owner

Would be nice to have the Framework id of SvelteKit built-in.

Would be nice to have the Framework id of SvelteKit built-in. <!-- github-comment-id:2290165554 -->
Author
Owner

Support the following features for adoc.

  • frontMatter.content.fmHighlight
  • frontMatter.content.hideFm
  • frontMatter.content.hideFmMessage
Support the following features for adoc. - frontMatter.content.fmHighlight - frontMatter.content.hideFm - frontMatter.content.hideFmMessage <!-- github-comment-id:2290202960 -->
Author
Owner

It looks like labels and details are missing from various commands.

Will check what is going on here. It seems the localization functionality isn't working.

> It looks like labels and details are missing from various commands. Will check what is going on here. It seems the localization functionality isn't working. <!-- github-comment-id:2291839326 -->
Author
Owner

@bwklein the localization issue should have been fixed in the latest beta version.

@bwklein the localization issue should have been fixed in the latest beta version. <!-- github-comment-id:2291860364 -->
Author
Owner

@estruyf I think the image tool should use the image block macro instead of the inline image macro.

https://docs.asciidoctor.org/asciidoc/latest/macros/images/

@estruyf I think the image tool should use the image block macro instead of the inline image macro. https://docs.asciidoctor.org/asciidoc/latest/macros/images/ <!-- github-comment-id:2293746273 -->
Author
Owner

@zivbk1 that is using two :: instead of one : ?

@zivbk1 that is using two `::` instead of one `:` ? <!-- github-comment-id:2293773542 -->
Author
Owner

Yes, the second colon tells the compiler to make a 'block' instead of an 'inline' image.

Yes, the second colon tells the compiler to make a 'block' instead of an 'inline' image. <!-- github-comment-id:2294436716 -->
Author
Owner

Support the following features for adoc.

frontMatter.content.fmHighlight
frontMatter.content.hideFm
frontMatter.content.hideFmMessage

When you add adoc to the supported file types, it should automatically use these features.

image

image

> Support the following features for adoc. > > frontMatter.content.fmHighlight > frontMatter.content.hideFm > frontMatter.content.hideFmMessage When you add `adoc` to the supported file types, it should automatically use these features. ![image](https://github.com/user-attachments/assets/3cf70f83-ac33-4317-9b1b-79fbfa3ea0c1) ![image](https://github.com/user-attachments/assets/ff4a43bb-5aef-4325-bbe4-c085589933be) <!-- github-comment-id:2330887161 -->
Author
Owner

This functionality is now part of the v10.4.0 main release.

This functionality is now part of the `v10.4.0` main release. <!-- github-comment-id:2373238656 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/vscode-front-matter#657