From 3110e5a9a32b8cf731ea9fde7942137b930e588c Mon Sep 17 00:00:00 2001 From: joostdecock Date: Wed, 4 Oct 2023 18:44:25 +0200 Subject: [PATCH] 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 --- markdown/dev/api/en.md | 7 +++++-- markdown/dev/contribute/en.md | 4 ++-- markdown/dev/design/en.md | 35 +++++++++++++++++++++++------------ markdown/dev/i18n/en.md | 3 ++- 4 files changed, 32 insertions(+), 17 deletions(-) diff --git a/markdown/dev/api/en.md b/markdown/dev/api/en.md index 719180c017f..79aae195baa 100644 --- a/markdown/dev/api/en.md +++ b/markdown/dev/api/en.md @@ -5,15 +5,18 @@ title: API Docs Welcome to the FreeSewing API documentation, you can find information for the following APIs here: -## +## Core API Reference documentation for our core library for parametric pattern design: +- -## +## Backend REST API + Reference documentation for our backend and its REST API: +- diff --git a/markdown/dev/contribute/en.md b/markdown/dev/contribute/en.md index 22141dd0fe8..bf5f9560f42 100644 --- a/markdown/dev/contribute/en.md +++ b/markdown/dev/contribute/en.md @@ -4,13 +4,13 @@ title: Contribute Looking to contribute to FreeSewing? That's wonderful. -## +## Ways to contribute There are many ways to contribute, here's some examples: -## +## Code of Conduct All FreeSewing contributors must respect and uphold our Code of Conduct: diff --git a/markdown/dev/design/en.md b/markdown/dev/design/en.md index 8910d934a24..be836439f0f 100644 --- a/markdown/dev/design/en.md +++ b/markdown/dev/design/en.md @@ -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: -## [](/guides/prerequisites) +## Before you start Outlines the minimal prerequisites you should understand before you dive in, including: +- -## [](/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: +- -## [](/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: +- -## [](/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: - +- + -## [](/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: +- -## [](/howtos/design) +## Common design challenges This is a list of common challenges in designing parametric sewing patterns, and tips on how to tackle them: +- -## [](/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: +- -## [](/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: +- -## [](/reference/macros) +## Macros This is the reference documentation for macros provided by FreeSewing's own plugins: +- -## [](/reference/snippets) +## Snippets This is the reference documentation for snippets provided by FreeSewing's own plugins: +- -## [](/reference/plugins) +## Plugins This is the list of all plugins we provide: +- diff --git a/markdown/dev/i18n/en.md b/markdown/dev/i18n/en.md index 4ae07749e59..71915ab3870 100644 --- a/markdown/dev/i18n/en.md +++ b/markdown/dev/i18n/en.md @@ -14,8 +14,9 @@ FreeSewing currently is available in the following languages: - German - Ukranian -## +## Translation guide This guide for translators covers everything you need to know about (helping out with) the translation of FreeSewing. +-