It's currently impossible to override some components, make it be possible... #4123
babakfp
started this conversation in
Feature Requests
Replies: 1 comment 2 replies
|
Thanks for the discussion. Could you describe your specific use case? What changes are you trying to make to the table of contents? |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
What version of
starlightare you using?0.41.7
What is your idea?
The docs say that I can customize
TableOfContents.astro.Is that true? Kind of true and also not true.
That file contains a code importing the
TableOfContentsList.astrocomponent; This file is not exposed publicly using theexportsproperty frompackage.json.@astrojs/starlightdoes not provide a way to importTableOfContentsList.astro.What should happen then?
into this:
and that's it, it should just work now!
It's not only the
components-internalsthat is needed to be exported, it's other folders and files too. The wholestarlightpackage (packages/starlight) (all paths from root and nexted) should be exported as is (excluding things likevitest.config.ts).As far as I checked, these are required:
Why is this feature necessary?
Because without it, it's not possible no just simply override an Astro component. Maybe I like 99% of what a built-in component does, but i would like to change only 1% of it, currently it's no possible.
Do you have examples of this feature in other projects?
No response
Participation
Related
All reactions