sidebars fix

This commit is contained in:
Danya H 2025-02-05 17:00:03 +00:00
parent 6ae665ee64
commit 53e09a9613
2 changed files with 16 additions and 9 deletions

View File

@ -53,21 +53,18 @@ function getFwSidebar() {
} }
for (const version of versions.items) { for (const version of versions.items) {
if (version.text.includes('latest')) { const v = version.text.replace('(latest)', '').trim()
const files = listChildFiles(path.resolve('docs', dir)) const files = listChildFiles(path.resolve('docs', dir, v))
if (version.text.includes('latest')) {
sidebar[`/${dir}/`] = [ sidebar[`/${dir}/`] = [
{ {
...base, ...base,
items: files.map((f) => ({ text: formatFilename(f), link: `./${f}` })) items: files.map((f) => ({ text: formatFilename(f), link: `./${v}/${f}` }))
}, },
versions versions
] ]
continue
} }
const v = version.text.replace('(latest)', '').trim()
const files = listChildFiles(path.resolve('docs', dir, v))
sidebar[`/${dir}/${v}/`] = [ sidebar[`/${dir}/${v}/`] = [
{ {
@ -76,6 +73,14 @@ function getFwSidebar() {
}, },
versions versions
] ]
sidebar[`/${dir}/${v}`] = [
{
...base,
items: files.map((f) => ({ text: formatFilename(f), link: `../${f}` }))
},
versions
]
} }
return sidebar return sidebar

View File

@ -46,7 +46,7 @@ These are setup as-should if you are using our CLI, if you still want to setup y
## Contributing ## Contributing
Join our community of developers and contribute to the ongoing development of RageFW. At the moment the only way to contribute is opening issues Join our community of developers and contribute to the ongoing development of RageFW. At the moment the only way to contribute is opening [issues](https://git.entityseven.com/entityseven/rage-framework/issues)
## Support ## Support
@ -54,6 +54,8 @@ Need help? Reach out via our community forums or contact us directly through our
## License ## License
Licensed under **Custom Attribution-NoDerives Software License** [Licensed under **Custom Attribution-NoDerives Software License**](https://git.entityseven.com/entityseven/rage-framework/src/branch/master/LICENSE)
<br/>
> _RageFW - because in the world of GTA:RP, nobody has time for type errors_ > _RageFW - because in the world of GTA:RP, nobody has time for type errors_