Now, Slate will use localStorage to track the last selected
language, so if the user visits again with no language in the URL,
they will be redirected to the last language they used.
This update also fixes a bug with how the layout inserts the
language names into the javascript. Previously, they would be,
(for some inane reason) arrays within arrays. It is now just
an array. Whoever wrote that previous code was clearly a fool.
Now, if no languages are specified, the language selection bar simply doesn't appear.
It has also been renamed from "languages" to "language_tabs".
Additionally, now language names default to the markdown name. They can still be overridden by the languagename:Display Name syntax.
This commit has two benefits:
- Now, copying the URL will actually copy the current language as well. You don't need to think to add a language
- If a language moves objects on the page down, the tocify header location cache will not be invalid, since it is generated on page load. Therefore, if code moves some elements down, since the page is reloaded, the cache will also be regenerated, to reflect the real locations of the headers.