1
0
Fork 0
freesewing/markdown/dev
joostdecock 3110e5a9a3 fix(markdown): Don't use MDX components to construct headers
Closes #4776

This is a somewhat low-tech fix for this problem.
That's because it's not entirely trivial to resolve this as the MDX
components rely on the React context to figure out the title of the
page, but the remark plugin runs in an SSR context and does not have
access to the React contenxt.

Futhermore, while we could load the context statically for dev (given
the navigation context for the docs is availabel in the prebuild data)
this would lead to problems for org because we don't know inside this
remark plugin what language the user requested.

And while I'm certain we could figure it out given enough effort, it
hardly seems worth is since this is used in very few places.

In addition, it would do nothing to solve the matter of the nested a
tags when putting a link in the title, which clashes with the
auto-generated amchor links for titles.

So new rules:

- Title cannot be a link
- You can not use `DocsTitle` as title
2023-10-04 18:44:25 +02:00
..
api fix(markdown): Don't use MDX components to construct headers 2023-10-04 18:44:25 +02:00
contact chore(markdown): Add contact info 2023-05-23 10:52:00 +02:00
contribute fix(markdown): Don't use MDX components to construct headers 2023-10-04 18:44:25 +02:00
design fix(markdown): Don't use MDX components to construct headers 2023-10-04 18:44:25 +02:00
guides chore(dev): Changes for v3 2023-09-30 15:57:51 +02:00
howtos chore(dev): Changes for v3 2023-09-30 15:57:51 +02:00
i18n fix(markdown): Don't use MDX components to construct headers 2023-10-04 18:44:25 +02:00
infra chore(markdown): Pages for dev site 2023-05-22 17:33:03 +02:00
reference Parts renamed to stacks in layout reference docs 2023-07-08 20:47:09 +02:00
sitemap wip: Work on sitemap 2023-07-13 18:18:07 +02:00
support chore(markdown): Add contact info 2023-05-23 10:52:00 +02:00
training chore: Better index pages in dev markdown 2023-06-17 12:08:13 +02:00
tutorials chore(dev): Changes for v3 2023-09-30 15:57:51 +02:00