Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streamline html and md page build #42

Open
robinmetral opened this issue Aug 15, 2024 · 0 comments
Open

Streamline html and md page build #42

robinmetral opened this issue Aug 15, 2024 · 0 comments

Comments

@robinmetral
Copy link
Owner

Currently, html pages are simply fed to mustache. md pages are first fed to unified, which runs them through a series of plugins, and then the output html is fed to mustache.

This can create weird behaviors. For example, if a page is written in md, then its heading will get automatic ids for in-document references. If the same page is in html, they won't.

Potential solutions:

  • do nothing, this is fine
  • run html pages through unified in a slightly different pipeline (rehype-parse 👉 rehype plugins 👉 rehype-stringify). The remark plugins wouldn't take effect (and I don't think they should, if something can be done on either the mdast or the hast it should be done on the hast) but the rehype plugins would.
  • decide that ALL pages should be markdown. html should be only for templating.
    • what about templates that have separate content "slots"?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant