arcjet / arcjet-docs

Arcjet's documentation.
https://docs.arcjet.com
Creative Commons Attribution 4.0 International
9 stars 3 forks source link

Explore content layer #121

Open morekid opened 1 month ago

morekid commented 1 month ago

Context: https://github.com/arcjet/arcjet-docs/issues/55#issuecomment-2379834926 Experiment: https://github.com/arcjet/arcjet-docs/pull/118

blaine-arcjet commented 4 weeks ago

Ref https://5-0-0-beta.docs.astro.build/en/guides/content-collections/ and https://docs.astro.build/en/reference/configuration-reference/#creating-a-loader

blaine-arcjet commented 2 weeks ago

I created a non-working prototype of some changes at https://github.com/arcjet/arcjet-docs/tree/phated/everything-is-broken. My findings were mostly that content layer doesn't work well with things that need to b analyzed statically (such as frontmatter, mdx, etc) since the static analysis happens before rendering.

The branch is useful because it explored some techniques with writing our own remark plugins to augment the static analysis.