intelops / external-docs

This is the repo to manage all the public documentation.
https://docs.intelops.ai
1 stars 10 forks source link

issue with internal docs site with same exact template #8

Closed devopstoday11 closed 1 year ago

devopstoday11 commented 2 years ago

https://www.loom.com/share/603fc0afa4244b728e4ac4ec0713a49a

tfsojon commented 2 years 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.

devopstoday11 commented 2 years ago

@tfsojon, yeah got it. Thanks for explaining. What should I change for my internal docs site to make the URL work fine?

tfsojon commented 2 years ago

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.

search for split, scroll-down to the bottom in search panel and open this pages then update [1] [2] to [3] [4] like this

image

open menu.html then update $i 2 $i 3 to $i 4 $i 5 like this

image

open default.html then update path.Dir to path.BaseName like this

image