simologos / docusaurus-plugin-includes

Include plugin for Docusaurus.
MIT License
11 stars 5 forks source link

Documents without frontmatter do not render #4

Open drwelby opened 1 year ago

drwelby commented 1 year ago

In upgrading from 1.13 to 1.14 markdown pages no longer have any content in them unless the page has frontmatter metadata. This appears to come from the change introduced here: https://github.com/simologos/docusaurus-plugin-includes/blob/master/src/includesLoader.ts#L27-L31

If I understand the comment correctly, it looks like you are trying to prevent "included" markdown files from being picked up as documents, but in my case the existing documents are still found but just don't have content in them.

It seems that another approach is needed, but in the mean time could you add a note to the README that clearly states that documentation pages must have front matter for the plugin to work?

drwelby commented 1 year ago

I do have a workaround that seems to accomplish the goals:

This lets me use Markdown files with no frontmatter as document pages, but not have the Markdown include pages get converted to pages and then show up sitemap.xml and so on.