Doc for @theme-original and @theme-init
See original GitHub issue📚 Documentation
I think this D2 feature is currently not documented.
If we want to override an existing comp, yet reuse the original comp (like, if you want to wrap it), there’s a special import alias we can use.
It’s worth trying if the following work and document this feature
import OriginalDocItem from "@theme-original/DocItem";
export default function CustomDocItem(props) {
return (
<>
<div>
before doc
</div>
<OriginalDocItem {...props} />
<div>
after doc
</div>
</>
);
}
That could be nice to find a tiny usecase for this feature on D2 website, for dogfooding and ensuring this behavior does not break over time.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Client architecture | Docusaurus
A theme works by exporting a set of components, e.g. Navbar , Layout , Footer , to render the data passed down from...
Read more >Base theme classy has not been installed [#3228896] - Drupal
I'm learning Drupal and reading a book "Handboek Drupal 8" by Maarten de Block. I followed his instructions on how to custumize a...
Read more >Creating Your Own Theme - Varbase Docs - Vardot
Creating Your Own Theme. After building and installing the project with the Varbase Project template, use the create new Vartheme sub theme command....
Read more >Change a theme and make it the default in Word or Excel
Document themes make it easy to coordinate colors, fonts, and graphic ... Tip: To return to the original theme colors, click Reset before...
Read more >Light and Dark Themes · Codebase - GitHub Pages
Codebase has simple built-in light and dark CSS themes in ... Switch between the light and dark themes in these docs: ... function...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@theme-original
was added by me for the purposes you mentioned.@theme-init
was added by @lex111 for reducing code duplication for the code blocks. They serve different purposes.This does seem like an straightforward clarification to add to the docs. Started a PR with proposed changed based on Alexey’s explanation. Let me know if this is something that is close to what is wanted or if this needs to be changed.