Changelog
0.3.0#
Minor Changes#
- #10
81d78eaThanks @BlackWild! - Exports, navigation helpers, optional browser scripts, and more of MyST rendered.- Exports: the new
exportsoption (integration and loader) has mystmd export every page, or a whole collection, to PDF (LaTeX or Typst), Word, LaTeX sources, Markdown or JATS XML duringastro build(inastro devtoo withdev: true). The files are served like images and listed indata.myst.exportsfor download links:exports: ['pdf', 'docx']or{ pages, collection, templates, dev }. Exports declared in a page’s frontmatter are built when their format is enabled; anoutputpath in them, which would write next to your content, is refused. - Navigation:
data.myst.parentslists the toc groups and parent pages of each entry, andmystNavigation(entries)andmystPrevNext(entries, current)(fromastro-myst) build a sidebar tree with group titles and previous/next links. - Browser scripts (
scriptsoption): tabs with the same:sync:key switch together (syncTabs, on by default), copy buttons on code blocks (copyCode), and Mermaid diagrams drawn in the browser (mermaid; installmermaid). - Frontmatter parts such as
abstract:are now rendered (the abstract before the content, other parts after it) and available as HTML indata.myst.parts. - Frontmatter
downloadsare served and listed indata.myst.downloads. {bibliography}places the references where it stands; without it they still follow the page.{si}typesets compound units like siunitx (9.81 m s⁻²instead of mystmd’s9.81 mperssquared);{chem}renders numbers as subscripts (span.myst-chem),{eval}results arespan.myst-eval,{toc}renders asnav.myst-tocinstead of a part with a “Toc:…” heading, and{button}keeps itsbuttonclass on cross-references (plusmyst-button, styled by the optional theme).- The optional theme can hang margin notes in the page margin on wide screens (
myst-margin-columnclass next tomyst).
- Exports: the new
0.2.0#
Minor Changes#
- #8
5ee6563Thanks @BlackWild! - Breaking: astro-myst is now an Astro integration plus a loader, and MyST content needs nomyst.yml.// astro.config.ts import myst from "astro-myst"; export default defineConfig({ integrations: [myst()] }); // src/content.config.ts import { mystLoader } from "astro-myst/loaders"; export const collections = { blog: defineCollection({ loader: mystLoader({ base: "./src/content/blog" }), }), };- Like Astro’s
glob()loader, every matching file of a folder (default**/[^_]*.{md,ipynb}) becomes an entry, with the same ids. The files are compiled together by mystmd as a project that astro-myst generates in Astro’s cache folder, so numbering, cross-references and citations work across them, and.bibfiles in the folder are found automatically. MyST options go in the integration’s or loader’sprojectoption; order and nesting in the loader’stocoption. - Nothing is written next to your content or into
public/: the dev server serves images and downloads from Astro’s cache, and builds copy them (only the ones pages use) into the output, also for server output with adapters. - Entry data keeps your own frontmatter keys (mystmd drops keys it does not know), so you can type them by extending
mystSchema, includingimage(). MyST’s normalizedtitle,authors,date(now aDate),thumbnail, … sit next to them, anddata.mystholdsurl,order,level,enumeratorandkind. Entries also havebodyandfilePath. - The integration adds the stylesheets to every page:
styles: 'base'(default; KaTeX plus only what MyST content needs to work, with zero specificity so your CSS, Tailwind andprosewin),'theme'(adds an optional theme with dark mode) orfalse. The rules sit in the cascade layercomponents, between Tailwind 4’s preflight and its utilities, whichever stylesheet loads first. Code blocks carry their own colours and follow dark mode, including Tailwind’s.darkclass. args: ['--execute']runs notebooks and Markdown notebooks wherever the collection lives (mystmd’s Jupyter server only accepts files inside its project folder, which the generated project now links to).- All classes in the rendered HTML now start with
myst-, so the injected CSS cannot clash with your site’s classes.
0.1 0.2 content/myst.ymlintegration/loader projectoptions, loadertocandpatternimport { mystLoader } from 'astro-myst'import { mystLoader } from 'astro-myst/loaders'andintegrations: [myst()]mystLoader({ root })mystLoader({ base })routeBase(default/)route, a prefix or a function (default/<collection>)mystArgs,commandargs(integration or loader),command(integration)numberedReferences,site.options.numbered_referencesnumberedCitationsbibliographyTitle,footnotesTitlelabels: { references, footnotes }assetsDir,skipThemeDownload,project(multi-project sites)removed data.path,data.isIndex,data.sourceentry.id('index'for the root page),entry.filePathdata.url,.order,.level,.enumerator,.kinddata.myst.url,.order,.level,.enumerator,.kinddata.frontmatteryour keys are in data; MyST’s full frontmatter isrender(entry).remarkPluginFrontmattermystPageSchemamystSchemaastro-myst/styles.cssadded automatically ( base.css), optionaltheme.cssclasses xref,cite,admonition,math-display,card,grid,tab-set, …myst-xref,myst-cite,myst-admonition,myst-math-display,myst-card,myst-grid,myst-tabs, …content/_build/andpublic/_myst/in.gitignorenot needed any more - Like Astro’s
0.1.2#
Patch Changes#
- #6
9fa1108Thanks @BlackWild! - Images now get bothwidthandheightas CSS, as in MyST’s own theme::height: 40%was written as the HTML attributeheight="40%", which browsers read as 40 pixels, and heights had no effect inside figures..mp4files in{image},{figure}andrender as looping, muted<video>elements instead of broken images. - #6
4e56ad5Thanks @BlackWild! - Repeated references to the same footnote get unique ids (fnref-n,fnref-n-2, …) instead of duplicate ones; the footnote’s back-link still points to the first reference.
0.1.1#
Patch Changes#
- #4
2603e38Thanks @BlackWild! - First release published from GitHub Actions with provenance.
0.1.0 — 2026-10-14#
Initial release.
mystLoader(): Astro content loader that compiles a MyST project withmystmd(myst build --site) and stores rendered HTML, headings and typed page data per MyST page.- Full MyST semantics from mystmd: numbering, cross-page references, citations, footnotes, KaTeX math with macros, proofs, admonitions, tabs, grids, cards, notebooks with outputs.
- URL rewriting that respects Astro
base,trailingSlashand a configurablerouteBase; assets copied topublic/<assetsDir>. - Offline builds (no download of MyST’s React theme), build caching keyed on the MyST sources, live recompilation in
astro dev. - Custom node
handlers, Shiki code highlighting, default stylesheet, KaTeX stylesheet, and theXrefPreviewcomponent for hover previews. - Notebook cell visibility tags, large outputs stored as files, and the output format of mystmd < 1.7.
- Multi-project MyST sites (
projectoption),extraInputsfor files outside the project, references into external MyST sites. - LaTeX (
.tex) pages: document parts such as\begin{abstract}render as sections, and KaTeX’s own line numbers are hidden soalignblocks show MyST’s single number. - Numbered citations (
[1]) via myst.ymlsite.options.numbered_referencesor thenumberedReferencesoption. - DOI citations: bibliography ids are derived safely from doi.org labels (
cite-doi-10.5281-zenodo.6476040);myst.doi.bibwritten by--doi-bibis not treated as a source (no rebuild loop in dev). - Empty frontmatter strings (e.g. a title made only of an unsupported macro) are treated as missing.
- Lower-level
compileMystProject(),readMystBuild()andrenderMystPage()APIs.