-
I have several static arrays of names and links which I use in a page to generate lists of external links (one list per array). I would like to also have these lists available in a sidebar with corresponding I tried to override the definitions in For now I fully re-defined the links in the Is there any way to generate this sidebar dynamically from the available static arrays, in |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
@slorber, any thought on this? |
Beta Was this translation helpful? Give feedback.
An array of name or a JSON, it's the same, you can import both from any js or ts file.
The advice remain: import your tools in sidebars.js
You can keep a function if you want, or export a static object, or rename the file as json. It doesn't matter. What matters is that sidebars.js use the data you already define instead of duplicating it.
The answer remains the same,
If it's a function, you import it in sidebars.js and call it there, take the …