Skip to content

Is there a way to append metadata string to code blocks? #724

Answered by tgreyuk
TomerAberbach asked this question in Help
Discussion options

You must be logged in to vote

@TomerAberbach apologies for delayed reply.

This could be achieved with remark. Unfortunately there was a bug in docusaurus-plugin that was preventing the remark plugin being loaded properly but that is fixed now.

I have a working example here - https://github.com/typedoc2md/typedoc-plugin-markdown-scratchpad/tree/main/issues/724. This example isn't running with Docusaurus, but I have also tested with docusaurus-plugin-typedoc@1.1.1.

Your config would look something like this:

docusaurus.config.js

 plugin: ["typedoc-plugin-remark"],
 remarkPlugins: ["./remark-add-playground.mjs"]

remark-add-playground.mjs

import { visit } from "unist-util-visit";

export default function addPlayground() …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@TomerAberbach
Comment options

Answer selected by TomerAberbach
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants