diff --git a/www/README.md b/www/README.md index dd00160..29d9456 100644 --- a/www/README.md +++ b/www/README.md @@ -200,6 +200,35 @@ Available sizes are `default` and `small`. A `_blank` target automatically adds Normal Markdown links remain preferred for ordinary page and article content. +### Stable Heading Links + +Astro automatically generates an ID for each Markdown heading. When a section +needs a stable, editorially controlled fragment link, add an explicit ID with +Sätteri heading-attribute syntax: + +```md +## Accepted Insurance Carriers {#accepted-insurance-heading} +``` + +Link to it with the resulting fragment URL: + +```md +[View accepted carriers](/insurance#accepted-insurance-heading) +``` + +Keep explicit IDs unique within the page, lowercase, and hyphenated. Treat a +published ID as permanent so inbound links do not break when heading text is +edited. This syntax is supported in both Markdown and MDX files. + +### Markdown Directives + +Sätteri directive parsing is enabled for container (`:::name`), leaf +(`::name`), and text (`:name`) directives. Parsing creates directive nodes; +rendering a named directive requires a corresponding Markdown transformation +plugin. Until a directive and its semantic HTML treatment are registered, do +not use it in published content because the default renderer omits unhandled +directive nodes. + ### Front Matter CMS The project includes `frontmatter.json` for the Front Matter CMS VS Code diff --git a/www/astro.config.mjs b/www/astro.config.mjs index 9a8a437..31fdb7e 100644 --- a/www/astro.config.mjs +++ b/www/astro.config.mjs @@ -1,5 +1,6 @@ import { defineConfig } from 'astro/config'; import mdx from '@astrojs/mdx'; +import { satteri } from '@astrojs/markdown-satteri'; export default defineConfig({ site: 'https://www.azinstitute4autism.com', @@ -7,6 +8,12 @@ export default defineConfig({ compressHTML: true, integrations: [mdx()], markdown: { + processor: satteri({ + features: { + headingAttributes: true, + directive: true + } + }), shikiConfig: { theme: 'github-light' } } }); diff --git a/www/package-lock.json b/www/package-lock.json index d2869e0..161648e 100644 --- a/www/package-lock.json +++ b/www/package-lock.json @@ -6,6 +6,7 @@ "": { "name": "arizona-institute-for-autism", "dependencies": { + "@astrojs/markdown-satteri": "^0.3.5", "@astrojs/mdx": "^7.0.5", "astro": "^7.1.5", "cheerio": "^1.1.0", diff --git a/www/package.json b/www/package.json index e695160..ab1ca9a 100644 --- a/www/package.json +++ b/www/package.json @@ -20,6 +20,7 @@ "generate:redirects": "node tools/generate-redirects.mjs" }, "dependencies": { + "@astrojs/markdown-satteri": "^0.3.5", "@astrojs/mdx": "^7.0.5", "astro": "^7.1.5", "cheerio": "^1.1.0", diff --git a/www/reports/migration-summary.md b/www/reports/migration-summary.md index 2bb55ba..f663543 100644 --- a/www/reports/migration-summary.md +++ b/www/reports/migration-summary.md @@ -73,6 +73,10 @@ Implemented fidelity work includes: than preserving the live pages' differing row spacing. - The Community 4 Autism logo on `/donate-autism-giveback` is horizontally centered on mobile instead of retaining the live page's left alignment. +- The empty `