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
This commit is contained in:
parent
97520a0a7d
commit
3110e5a9a3
4 changed files with 32 additions and 17 deletions
|
@ -5,15 +5,18 @@ title: API Docs
|
|||
Welcome to the FreeSewing API documentation, you can find information for
|
||||
the following APIs here:
|
||||
|
||||
## <DocsLink slug="reference/api" />
|
||||
## Core API
|
||||
|
||||
Reference documentation for our core library for parametric pattern design:
|
||||
|
||||
- <DocsLink slug="reference/api" />
|
||||
<ReadMore root="reference/api" />
|
||||
|
||||
## <DocsLink slug="reference/backend" />
|
||||
## Backend REST API
|
||||
|
||||
|
||||
Reference documentation for our backend and its REST API:
|
||||
|
||||
- <DocsLink slug="reference/backend" />
|
||||
<ReadMore root="reference/backend" />
|
||||
|
||||
|
|
|
@ -4,13 +4,13 @@ title: Contribute
|
|||
|
||||
Looking to contribute to FreeSewing? That's wonderful.
|
||||
|
||||
## <DocsLink slug="howtos/ways-to-contribute" />
|
||||
## Ways to contribute
|
||||
|
||||
There are many ways to contribute, here's some examples:
|
||||
|
||||
<ReadMore root='howtos/ways-to-contribute' />
|
||||
|
||||
## <DocsLink slug="guides/code-of-conduct" />
|
||||
## Code of Conduct
|
||||
|
||||
All FreeSewing contributors must respect and uphold our Code of Conduct:
|
||||
|
||||
|
|
|
@ -5,79 +5,90 @@ title: Design
|
|||
If you are looking to use FreeSewing to design parametric sewing patterns,
|
||||
below are the most relevant materials on this site for you:
|
||||
|
||||
## [<DocsTitle slug="guides/prerequisites" />](/guides/prerequisites)
|
||||
## Before you start
|
||||
|
||||
Outlines the minimal prerequisites you should understand before you dive in, including:
|
||||
|
||||
- <DocsLink slug="guides/prerequisites" />
|
||||
<ReadMore root="guides/prerequisites" />
|
||||
|
||||
## [<DocsTitle slug="guides/best-practices" />](/guides/best-practices)
|
||||
## Pattern design best practices
|
||||
|
||||
In design as in code, there's often many different ways to accomplish the same
|
||||
result. We have a list of best practices that we recommend you follow. Even if
|
||||
in the end you make your own choices, we recommend you at least ready through
|
||||
them once. They include:
|
||||
|
||||
- <DocsLink slug="guides/best-practices" />
|
||||
<ReadMore root="guides/best-practices" />
|
||||
|
||||
## [<DocsTitle slug="guides/designs" />](/guides/designs)
|
||||
## Design guide
|
||||
|
||||
We've so far been talking about *patterns* but what you're really be creating is a *design*.
|
||||
What the difference is, and what goes into a design to generate a pattern is explained in our design guide:
|
||||
|
||||
- <DocsLink slug="guides/designs" />
|
||||
<ReadMore root="guides/designs" />
|
||||
|
||||
## [<DocsTitle slug="tutorials/pattern-design" />](/tutorials/pattern-design)
|
||||
## Pattern design tutorial
|
||||
|
||||
This is our pattern design tutorial. If you're new to designing patterns with
|
||||
FreeSewing, following the tutorial is the fastest way to get started:
|
||||
|
||||
<ReadMore root="tutorials/pattern-design" />
|
||||
- <DocsLink slug="tutorials/pattern-design" />
|
||||
<ReadMore root="tutorials/pattern-design" recurse />
|
||||
|
||||
## [<DocsTitle slug="guides/plugins" />](/guides/plugins)
|
||||
## Plugin guide
|
||||
|
||||
FreeSewing can be extended with plugins. We provide a range of plugins that you can use.
|
||||
However, if you'd like to write your own plugins, you should also read the guide on how they work:
|
||||
|
||||
- <DocsLink slug="guides/plugins" />
|
||||
<ReadMore root="guides/plugins" />
|
||||
|
||||
## [<DocsTitle slug="howtos/design" />](/howtos/design)
|
||||
## Common design challenges
|
||||
|
||||
This is a list of common challenges in designing parametric sewing patterns, and tips on how to tackle them:
|
||||
|
||||
- <DocsLink slug="howtos/design" />
|
||||
<ReadMore root="howtos/design" />
|
||||
|
||||
## [<DocsTitle slug="howtos/code" />](/howtos/code)
|
||||
## Common code challenges
|
||||
|
||||
While designing patterns in code has a lot of benefits, there might be times
|
||||
where things that are intuitive on paper don't come naturally to you. This is
|
||||
a list of common code challenges and how to tackle them:
|
||||
|
||||
- <DocsLink slug="howtos/code" />
|
||||
<ReadMore root="howtos/code" />
|
||||
|
||||
## [<DocsTitle slug="reference/api" />](/reference/api)
|
||||
## Core API
|
||||
|
||||
This is the reference documentation for FreeSewing's core library.
|
||||
This is where you can look up every possible API call with examples:
|
||||
|
||||
- <DocsLink slug="reference/api" />
|
||||
<ReadMore root="reference/api" />
|
||||
|
||||
## [<DocsTitle slug="reference/macros" />](/reference/macros)
|
||||
## Macros
|
||||
|
||||
This is the reference documentation for macros provided by FreeSewing's own plugins:
|
||||
|
||||
- <DocsLink slug="reference/macros" />
|
||||
<ReadMore root="reference/macros" />
|
||||
|
||||
## [<DocsTitle slug="reference/snippets" />](/reference/snippets)
|
||||
## Snippets
|
||||
|
||||
This is the reference documentation for snippets provided by FreeSewing's own plugins:
|
||||
|
||||
- <DocsLink slug="reference/snippets" />
|
||||
<ReadMore root="reference/snippets" />
|
||||
|
||||
## [<DocsTitle slug="reference/plugins" />](/reference/plugins)
|
||||
## Plugins
|
||||
|
||||
This is the list of all plugins we provide:
|
||||
|
||||
- <DocsLink slug="reference/plugins" />
|
||||
<ReadMore root="reference/plugins" />
|
||||
|
||||
<Note>
|
||||
|
|
|
@ -14,8 +14,9 @@ FreeSewing currently is available in the following languages:
|
|||
- German
|
||||
- Ukranian
|
||||
|
||||
## <DocsLink slug="guides/translation" />
|
||||
## Translation guide
|
||||
|
||||
This guide for translators covers everything you need to know about (helping out with) the translation of FreeSewing.
|
||||
|
||||
- <DocsLink slug="guides/translation" />
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue