Skip to content

Support remark/rehype plugins and other markdown options #185

@Yuhanawa

Description

@Yuhanawa

There is the type of markdown option in astro config

markdown:{
  syntaxHighlight: false | "shiki" | "prism";
  shikiConfig: {
      langs: ShikiLang[];
      theme: import("shiki").BundledTheme | ShikiTheme;
      themes: Record<string, import("shiki").BundledTheme | ShikiTheme>;
      langAlias: Record<string, string>;
      wrap: boolean | null;
      transformers: ShikiTransformer[];
      defaultColor?: string | false | undefined;
  };
  remarkPlugins: (string | [string, any] | RemarkPlugin | [RemarkPlugin, any])[];
  rehypePlugins: (string | [string, any] | RehypePlugin | [RehypePlugin, any])[];
  remarkRehype: RemarkRehype;
  gfm: boolean;
  smartypants: boolean;
}

The author often use remarkPlugins, rehypePlugins and transformers in shikiConfig,
So at least support for these three options should be provided

  • Allow user to disable all or only disable a plugin
  • Allow authors to choose to use user config or override

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions