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

Rework Markdoc info hierarchy #7744

Merged
merged 6 commits into from
Apr 4, 2024
Merged

Rework Markdoc info hierarchy #7744

merged 6 commits into from
Apr 4, 2024

Conversation

bholmesdev
Copy link
Contributor

Description (required)

  • Restructure table-of-contents with clearer h2 sections. Before, everything was nested under Configuration. This breaks out related sections, and moves higher-traffic content (ex. how to use UI components) further up).

Before | After
image image

Related issues & labels (optional)

  • Closes #
  • Suggested label:

Copy link

vercel bot commented Apr 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview Apr 4, 2024 0:28am
1 Ignored Deployment
Name Status Preview Updated (UTC)
docs-i18n ⬜️ Ignored (Inspect) Apr 4, 2024 0:28am

@sarah11918
Copy link
Member

@bholmesdev the table of contents does indeed look much nicer!

Just because the diff is going to look terrible here, and not really reflect what you actually did, is the section on Partials the only new/changed content (other than reordering?) This will save me a bunch of close reading trying to figure out what content actually did change, and will also help the translators who will have to make sense of this PR when they update in all the other languages. 😄

@bholmesdev
Copy link
Contributor Author

Yes, apologies! Let's get the Partials PR reviewed first, then rebase this PR once it is merged. That way we don't have to untangle new content from reorganization.

@sarah11918 sarah11918 added the improve or update documentation Enhance / update existing documentation (e.g. add example, improve description, update for changes) label Apr 3, 2024
@bholmesdev bholmesdev force-pushed the refactor/markdoc-toc branch from 3d3864d to 14550bb Compare April 3, 2024 20:56
@bholmesdev
Copy link
Contributor Author

@sarah11918 Okay, rebased and ready for review!

@sarah11918
Copy link
Member

Great! Assuming this is just reorganization of existing content for flow, this now should be an easier read!


For example, the heading `### Level 3 heading!` will pass `level: 3` and `id: 'level-3-heading'` as component props.

### Custom image components
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a note for translators: this heading has changed from "Custom image components in Markdoc" to just "Custom image components" It's more than just moved!! 💜

```

### Markdoc config
## Advanced Markdoc configuration
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note for translators: this heading has changed! Not just moved!

It was previously (lol) "### Markdoc config" (line 470 in English) nested under "## Markdoc config"

We heard you liked Markdoc config, so we put some Markdog config in your Markdoc config...

Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reorganization looks fantastic @bholmesdev !

I left a couple of notes for translators to indicate when a heading actually changed content (vs just moving around). You can ignore those, that's just for their convenience.

I also left a comment about a "read more" line that I think got missed or errantly moved in the shuffle. Pretty sure that was an unintentional change and I identified where it should end up instead.

The only thing about the reorganization itself I could see shuffling:

Pass Markdoc variables and Access frontmatter from your Markdoc could go much higher, I'd argue maybe even under Usage?

This seems like a more common use case, and related to just "writing Markdoc", enough so that it feels like it could go right above using components. Also noting that the Access frontmatter is very related to the usage example showing accessing frontmatter variables. So, if you think those two sections show reasonably common use cases, I'd throw them up at the top there. If you think they are low-usage things that aren't all that common, then no issue keeping them lower. They just feel much more related to writing your Markdoc to me.

In any event, whatever you decide, this is a fabulous change! 🫡

@bholmesdev
Copy link
Contributor Author

Thanks @sarah11918! Totally agree with that suggestion to move variables and frontmatter just after "usage."

I also realized the "markdoc language server" was buried at the end, when it really belongs under Installation. I actually discovered we have two competing sections for editor configuration! I resolved the differences in this commit. I also removed the lengthy explanation of the extension config file, just highlighting the parts that are relevant.

@@ -75,18 +75,29 @@ export default defineConfig({
});
```

### Editor Integration
### VS Code Editor Integration
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also note to translators: This new section is a combination of the older Editor Integration and #Markdoc langauge server. They have both been combined into this one!

Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me now, Ben! I assume we're not waiting on any other PR for this, so as soon as you're happy, feel free to merge this.

@sarah11918 sarah11918 added the Merge Queue Approved and ready to be merged (wait for feature release if also labelled M-O-R)! label Apr 4, 2024
@bholmesdev bholmesdev merged commit 8a31bf3 into main Apr 4, 2024
7 checks passed
@bholmesdev bholmesdev deleted the refactor/markdoc-toc branch April 4, 2024 13:49
thomasbnt added a commit to thomasbnt/docs that referenced this pull request Apr 6, 2024
yanthomasdev added a commit that referenced this pull request Apr 8, 2024
* i18n(fr): Updating `guides/integration-guide/markdoc.mdx` from #7743

Signed-off-by: Thomas Bonnet <[email protected]>

* i18n(fr): Updating `guides/integration-guide/markdoc.mdx` from #7744

Signed-off-by: Thomas Bonnet <[email protected]>

* i18n(fr): Fix link L232

Signed-off-by: Thomas Bonnet <[email protected]>

* Update src/content/docs/fr/guides/integrations-guide/markdoc.mdx

Co-authored-by: pioupia <[email protected]>

* Update src/content/docs/fr/guides/integrations-guide/markdoc.mdx

Co-authored-by: pioupia <[email protected]>

---------

Signed-off-by: Thomas Bonnet <[email protected]>
Co-authored-by: pioupia <[email protected]>
Co-authored-by: Yan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improve or update documentation Enhance / update existing documentation (e.g. add example, improve description, update for changes) Merge Queue Approved and ready to be merged (wait for feature release if also labelled M-O-R)!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants