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:
-
Tag renderer: Astro can override renderers for individual tags. For example, we can replace the default realisation of
\*\*\*
as<hr>
by something else, for example an .astro component. -
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. - Markdown/.mdx plugins: Astro supports third-party remark and rehype plugins.
Astro features
- Automatic Sitemap
- Automatic Routing (as long as we stay in SSG territory)
Multilingual Content and Ui
Template/Ui i18n
I found https://astro-i18next.yassinedoghri.com/\ which seems amazing for Ui and template localization (time, date, pluralization etc.) but what about blog posts that are available in several languages?
Multilingual Content
How does the Directus Editor handle multilingual text?
Problem description:
https://github.com/directus/directus/discussions/10362
Workaround:
https://blog.lunarbyte.io/2021/08/11/directus-content-translations/
Issue discussion: