Skip to content

fix language dropdown for getting-started pages #2639

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

Merged
merged 1 commit into from
Nov 18, 2022

Conversation

bishabosha
Copy link
Member

@bishabosha bishabosha commented Nov 18, 2022

singlepage-overview layout has to dynamically lookup the English page from translations to find the list of other languages, but it is hardcoded to look inside the _overviews collection, so is broken when used as a layout on any translated page where the English page is not in the _overviews collection.

I did not find a way to systematically relate e.g. _es/getting-started/index.md to _getting-started/index.md, when we also have to relate _zh-cn/tutorials/scala-for-java-programmers.md to _overviews/tutorials/scala-for-java-programmers.md so the simplest thing is to move the source files for _getting-started to overviews/getting-started.

before:
Screenshot 2022-11-18 at 10 55 56

after:
Screenshot 2022-11-18 at 10 56 07

alternatives:

  • making a new layout for getting-started - but why when we are not changing the styling, just more fragile things people must remember
  • adding more metadata to front matter of getting-started translations to say which collection should be searched - not scalable and prone to people forgetting

Copy link
Contributor

@julienrf julienrf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea!

@bishabosha bishabosha merged commit edc0e0d into scala:main Nov 18, 2022
@bishabosha bishabosha deleted the fix-getting-started branch November 18, 2022 11:31
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 this pull request may close these issues.

2 participants