Closed devopstoday11 closed 1 year ago
Basically in some cases Hugo does not works as we want.
Like in our doc site has unlimited inner-level of sections. to show those sections in a sidebar like tree we have to detect the version from URL.
also we have to manage the search functionality for multiple versions in a single site. where Hugo don't generates multiple JSON file. here also we have to detect the URL version.
So we use Hugo's different type of features to achieve this. In some cases I use JavaScript to get the URL index.
the doc will perfectly works with this type of baseURL's.
https://something.com/ [supports multilingual and all version search]
https://something.something.com/ [supports multilingual and all version search]
https://something.something.com/something/ [supports single-language and all version search]
If you want to keep that url in your production then we have to re-work for internal-doc site but we can't make support for every-type of baseURL's at once.
Hope you got the point.
@tfsojon, yeah got it. Thanks for explaining. What should I change for my internal docs site to make the URL work fine?
If you want to keep the URL like this https://tariandev_intelops.gitlab.io/documentation/internal-docs-hugosite
then you have to change the split index.
split
, scroll-down to the bottom in search panel and open this pages then update [1]
[2]
to [3]
[4]
like thismenu.html
then update $i 2
$i 3
to $i 4
$i 5
like thisdefault.html
then update path.Dir
to path.BaseName
like this
https://www.loom.com/share/603fc0afa4244b728e4ac4ec0713a49a