facebook / facebook/docusaurus
Theme protocol documentation
- Dominant language
- TypeScript
- Stars
- 66.2k
- Forks
- 10k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 52
Description
### Have you read the Contributing Guidelines on issues?
- [X] I have read the [Contributing Guidelines on issues](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#reporting-new-issues).
### Description
As we are starting to make another theme (and also allow users to create their own themes from scratch), we should make clear what a theme needs to implement at the bare minimum, and what props these components will receive.
This includes:
- Route components, mostly documented in https://docusaurus.io/docs/advanced/routing. These are a must because plugins call these directly.
- The tabs component, because the npm2yarn remark plugin depends on it.
And that's it! We just need to make sure that the props are stable. For now, this is ensured through typedefs, but in the future, if we no longer use module declarations (discussed in #6629), these implicit protocols will not be present. We need something more explicit than that.
Note that `themeConfig` is intentionally left out of this list. I strongly believe that, while `navbar` and `footer` and `prism` and stuff are useful, they are not _obligatory_. A theme should be allowed without them, or have a different API shape.
### Self-service
- [X] I'd be willing to address this documentation request myself.
Contributor guide
Assessment
This issue has not been assessed yet.