feat(markdown): enable Satteri authoring features
This commit is contained in:
1 parent
21b0ad7461
commit
6e0ff0c596
6 files changed
+52
-10
No files matched your search
@@ -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
|
||||
|
||||
@@ -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' }
|
||||
}
|
||||
});
|
||||
Generated
+1
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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 `<h6>` retained by the live `/schedule-consultation` page was
|
||||
removed. It had no visible content and generated an empty heading ID in the
|
||||
migrated Markdown, so omitting it improves heading semantics and fragment
|
||||
integrity without removing page content.
|
||||
|
||||
## URLs and Redirects
|
||||
|
||||
@@ -144,12 +148,17 @@ unavailable.
|
||||
- Extracted image alt text is retained where available.
|
||||
- Semantic landmarks, skip link, labeled forms, keyboard-operable navigation,
|
||||
language/direction attributes, and responsive layouts are present.
|
||||
- Sätteri heading attributes are enabled for Markdown and MDX, allowing stable
|
||||
explicit fragment IDs such as `{#accepted-insurance-heading}`. The built-site
|
||||
audit found no duplicate or invalid IDs and no missing same-page fragments.
|
||||
- Sätteri directive parsing is enabled. No named directive transformations are
|
||||
registered yet, so unhandled directives must not be added to published
|
||||
content until their semantic HTML rendering is defined.
|
||||
|
||||
## Validation Results
|
||||
|
||||
- `npm install --ignore-scripts`: completed; 323 packages audited with one
|
||||
moderate advisory. The current shell uses Node `20.17.0`, below the declared
|
||||
`>=20.19.0`; `flake.nix` now selects Node 22.
|
||||
- `npm audit --offline`: passed with zero known vulnerabilities under Node
|
||||
`24.18.0`; `flake.nix` provides a compatible current Node release.
|
||||
- `npm run audit:links`: passed with zero broken internal source links. The
|
||||
audit now checks generated routes, root-relative references, relative
|
||||
Markdown links, and public assets when rendered output is unavailable.
|
||||
@@ -161,8 +170,8 @@ unavailable.
|
||||
- `npm run generate:redirects`: passed.
|
||||
- All migration `.mjs` tools and the sandbox DNS helper pass `node --check`.
|
||||
- The Astro compiler parsed all 49 `.astro` files successfully.
|
||||
- `npm run build`: blocked before compilation because this autonomous sandbox
|
||||
cannot resolve `localhost`, causing `getaddrinfo EAI_AGAIN localhost`.
|
||||
- `npm run build`: passed with zero Astro diagnostics and generated 97 static
|
||||
pages.
|
||||
- `npm run build:sandbox`: passed; generated 97 static pages.
|
||||
- Live contact-page structure was inspected in browser at a 1280px desktop
|
||||
viewport; local generated HTML was checked for the contact layout, Leaflet
|
||||
@@ -172,9 +181,6 @@ unavailable.
|
||||
- Nix shell verification and `npm audit` retrieval were blocked by sandbox
|
||||
proxy/cache network resets.
|
||||
|
||||
Run `npm run build` outside the Codex sandbox with Node 20.19+ or Node 22 for
|
||||
final production-build proof.
|
||||
|
||||
## Manual Review
|
||||
|
||||
- Perform full-page desktop and mobile visual comparisons for page-specific
|
||||
|
||||
@@ -27,8 +27,6 @@ Sensory-Friendly Rooms
|
||||
|
||||
Convenient & Affordable
|
||||
|
||||
######
|
||||
|
||||
## ABA Therapy Services
|
||||
|
||||
Arizona Institute for Autism (AIA) is home to leading experts in behavioral health and special education. We provide clinical care for children and teens diagnosed with autism and have a no wait list policy.
|
||||
|
||||
Reference in new issue
Block a user