Skip to content

Add a reference for Markdown processor packages. - #14600

Merged
ArmandPhilippot merged 20 commits into
mainfrom
armand/markdown-processors-reference
Oct 7, 2026
Merged

ArmandPhilippot merged 20 commits into
mainfrom
armand/markdown-processors-reference

Conversation

@ArmandPhilippot

@ArmandPhilippot ArmandPhilippot commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

Context: Currently, we have no docs for @astrojs/markdown-remark and @astrojs/markdown-satteri. When we'll remove the deprecated Markdown options, we might want this to live elsewhere. Some helpers are useful for integrations (e.g. Starlight use some of them or use less convenient types).

Description (required)

  • Adds a reference page for @astrojs/markdown-remark:
    • I think it makes more sense to provide the options directly under unified(). This allows us to show defaults. So, I removed UnifiedProcessorOptions from the type list.
    • I didn't include UnifiedResolvedOptions. It doesn't seem helpful for users.
    • It seems that unified is always written in lowercase.
  • Adds a reference page for @astrojs/markdown-satteri:
    • I think it makes more sense to provide the options directly under satteri(). This allows us to show defaults. So, I removed SatteriProcessorOptions from the type list.
    • I didn't include SatteriResolvedOptions in the end. It seems rather internal?
    • Not sure there is a use case for the SatteriFeatures? So, I put the features directly under the satteri() options.
  • Adds them both to the sidebar.
  • Adds @astrojs/markdown-remark and @astrojs/markdown-satteri to the content collection config to be able to use <Since />.
  • Updates a few links and adds some <ReadMore /> in the Markdown and MDX guides.
  • Rewords the recma plugins sections in the MDX guide:
    • reduces repetition by replacing the deprecated recmaPlugins description (we had about the same description in 3 places...)
    • rewords "using recma plugins" to callout earlier this is only available with unified, and give a link to the reference

I took some liberty with a few types:

  • Features renamed to SatteriFeatures (they are identical) and so adding a link to Sätteri docs on them might be less confusing.
  • Root to MdastRoot/HastRoot with an external link
  • I didn't include the deprecated properties in the AstroMarkdownOptions type. Since this wasn't documented yet, I don't think we should show them.

I didn't include some exports that seemed "for Astro-use only" to me:

  • rehypeShiki: but I can see some people use it (e.g. in an unexepected next.config.ts file)
  • I couldn't find any evidence of external use for the others: satteriCollectHastText, satteriCollectImagesPlugin, satteriCreateHighlightFn, satteriHighlightPlugin, satteriImageMarkerPlugin, extractFrontmatter, isFrontmatterValid, markdownConfigDefaults, parseFrontmatter, rehypePrism, remarkCollectImages, syntaxHighlightDefaults, Node (re-export from unist), ParseFrontmatterOptions, ParseFrontmatterResult

Open questions:

  • ShikiConfig:
    • The options are kinda documented in the configuration reference, but written docs instead of a code block seems better (we own the type).
    • Now, maybe we should moved this to the config reference and the ShikiConfig type is not really useful by itself...
    • It seems some people use it, but from a different entrypoint (e.g. an Astro theme)
  • The references location is subject to debate:
    • I hesitated between the Reference (kinda similar to the virtual modules, astro/hono, and astro/zod) and Ecosystem (kinda similar to @astrojs/mdx) tabs.
    • Since this is written solely as a reference and this is tied to a core feature, I chose the Reference tab.
If you want to double check the `Since`, click here to expand the list.

References

@ArmandPhilippot ArmandPhilippot added the add new content Document something that is not in docs. May require testing, confirmation, or affect other pages. label Sep 22, 2026
@astrobot-houston

astrobot-houston commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the tracking.ignoredKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
guides/integrations-guide/mdx.mdx Source changed, localizations will be marked as outdated.
guides/markdown-content.mdx Source changed, localizations will be marked as outdated.
reference/markdown-processors/satteri.mdx Localization added, will be marked as complete.
reference/markdown-processors/unified.mdx Localization added, will be marked as complete.
nav/en.ts Source changed, localizations will be marked as outdated.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

@ArmandPhilippot
ArmandPhilippot marked this pull request as draft September 22, 2026 20:57
@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Preview deployment

✅ Deployment complete!

@ArmandPhilippot
ArmandPhilippot marked this pull request as ready for review September 28, 2026 13:25

@Princesseuh Princesseuh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Bit worrying all the things we export from the Remark processor, but so be it

@ArmandPhilippot

Copy link
Copy Markdown
Member Author

Well, at least not everything is documented. We can always clean up what sounds internal if there is another way without making this a breaking change! But, yes, there are a lot of things! 😅

Thanks for the review! 💜

@ArmandPhilippot
ArmandPhilippot merged commit 7cd7c27 into main Oct 7, 2026
9 checks passed
@ArmandPhilippot
ArmandPhilippot deleted the armand/markdown-processors-reference branch October 7, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

add new content Document something that is not in docs. May require testing, confirmation, or affect other pages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants