Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UI] Sometimes active doc page isn't highlighted within menu panel. #301

Closed
kczulko opened this issue Feb 26, 2019 · 3 comments · Fixed by #314
Closed

[UI] Sometimes active doc page isn't highlighted within menu panel. #301

kczulko opened this issue Feb 26, 2019 · 3 comments · Fixed by #314
Assignees

Comments

@kczulko
Copy link
Contributor

kczulko commented Feb 26, 2019

Hi,

When I run sbt-microsites Doc section and when I choose some doc page from the left panel, sometimes it is not being highlighted as the active one. Please see the example below (taken from sbt-microsites microsite).

Here the Layouts menu is highlighted as the active one:
layouts

But here Build the microsite isn't:
buildthemicrosite

If anyone could point me where I can fix that, I could try to handle it and submit PR.

Best regards,
Karol

@kczulko
Copy link
Contributor Author

kczulko commented Feb 26, 2019

Hi,

I think I know what's the root cause of that...

Please take a look here:
https://github.com/47deg/sbt-microsites/blob/master/docs/src/main/resources/microsite/data/menu.yml#L17

The title here is Build the microsite which isn't exactly the same string that is defined here (layout section - docs | Build the Microsite)
https://github.com/47deg/sbt-microsites/blob/master/docs/src/main/tut/docs/build-the-microsite.md

If there is any discrepancy then there are issues with highlighting selected doc page.

Best regards,
Karol

@calvellido
Copy link
Contributor

calvellido commented Feb 26, 2019

Hi @kczulko, the discrepancy on that specific case is the capitalization of Microsite. You can submit a PR for that, setting the same value in both cases if you'd like to fix that in sbt-microsites documentation.

Also, if you want to improve this feature in general, maybe you can normalize capitalization when the comparison happens, which is made in this template:

https://github.com/47deg/sbt-microsites/blob/master/src/main/scala/microsites/layouts/DocsLayout.scala

@calvellido
Copy link
Contributor

Thanks for point it out BTW! 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants