You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have several static arrays of names and links which I use in a page to generate list of external links (one list per array).
I would like to also have these lists available in a sidebar with corresponding category entries, one for each array, something like this:
I tried to override the definitions in sidebar.ts with some code in docusaurus.config.ts, but it did not work; I was able to import and access the sidebars, but writing the items properties did not change the content of the sidebars.
For now I fully re-defined the links in the sidebar.ts, but I'm not very keen of using duplicate code.
Is there any way to generate this sidebar dynamically from the available static arrays, in docusaurus.config.ts, before anything else happens?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have several static arrays of names and links which I use in a page to generate list of external links (one list per array).
I would like to also have these lists available in a sidebar with corresponding
category
entries, one for each array, something like this:I tried to override the definitions in
sidebar.ts
with some code indocusaurus.config.ts
, but it did not work; I was able to import and access the sidebars, but writing theitems
properties did not change the content of the sidebars.For now I fully re-defined the links in the
sidebar.ts
, but I'm not very keen of using duplicate code.Is there any way to generate this sidebar dynamically from the available static arrays, in
docusaurus.config.ts
, before anything else happens?Beta Was this translation helpful? Give feedback.
All reactions