|
|
https://docs.astro.build/en/guides/markdown-content/#mdx-features
|
|
|
|
|
|
I am currently experimenting with Astro: https://github.com/upsiflu/astro-blog
|
|
|
|
|
|
# Integration with Directus
|
|
|
|
|
|
* [ ] Each published .mdx should be put into the directory `content` resp. `content/blog`.
|
|
|
* [ ] Astro will build pages from these.
|
|
|
* [ ] When writing a page in the Directus editor, you can use predefined components.
|
|
|
* [ ] Drafts can be specified with the `draft: true` MD(x) frontmatter directive and will be automatically hidden by Astro.
|
|
|
|
|
|
## Customization
|
|
|
|
|
|
Defining blocks and components in the CMS is preferrable to hardcoding them in .astro. Directus can edit .mdx files, and Astro can do a lot with these, so we get the following features to allow block customization and composition:
|
|
|
|
|
|
1. **Tag renderer:** Astro can override renderers for individual tags. For example, we can replace the default realisation of `\*\*\*` as `<hr>` [by something else,](https://mdxjs.com/table-of-components/) for example an .astro component.
|
|
|
2. **Custom composable blocks:** We can define a directory `/block` to let CMS users author MDX fragments that can be reused in pages or other components, reducing the reliance on hardcoded .astro templates. Combined with (1.), we can expose a subset of the tag renderers as customizable .mdx files living in a `/tag` directory.
|
|
|
3. **Markdown/.mdx plugins:** Astro supports<span dir=""> third-party </span>[remark](https://github.com/remarkjs/remark)<span dir=""> and </span>[rehype](https://github.com/rehypejs/rehype)<span dir=""> plugins</span>. |
|
|
\ No newline at end of file |