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

Non light Default Theme Isn't Served On Page Load #1078

Closed
deg4uss3r opened this issue Oct 28, 2019 · 4 comments · Fixed by #1079
Closed

Non light Default Theme Isn't Served On Page Load #1078

deg4uss3r opened this issue Oct 28, 2019 · 4 comments · Fixed by #1079

Comments

@deg4uss3r
Copy link
Contributor

deg4uss3r commented Oct 28, 2019

When using the default-theme configuration option on mdbook v0.3.3 the "default theme" is not the theme rendered when opening book/index.html or connecting to localhost:3000 with mdbook serve running, it appears to always render light.

here's my book.toml:

[book]
authors = ["Ricky"]
multilingual = false
src = "src"
title = "Intro To Rust"

[output.html]
default-theme = "Ayu"
preferred-dark-theme = "Ayu"

The page shows I have Ayu selected as the default them but renders as light, tried clearing all caches and removing book/ and rebuilding. Happening to me on all the following browsers (Safari 13.0.2 (14608.2.40.1.3), Firefox Nightly 72.0a1 (2019-10-28) (64-bit), Firefox 70.0 (64-bit)). Image shows Ayu (default) but obviously not Ayu theme, if I then select it will then display.

@ehuss
Copy link
Contributor

ehuss commented Oct 28, 2019

I think it might be case sensitive. Can you try with lowercase ayu and see if that works?

@deg4uss3r
Copy link
Contributor Author

deg4uss3r commented Oct 28, 2019

...yup that was it. Should we add a .to_lowercase() in there somewhere in the theme matching to make some lives easier in the future?

I did have Ayu instead of ayu because that's how it was capitalized in the list (shown in the image above).

@Dylan-DPC-zz
Copy link

Yes that's a good idea

@deg4uss3r
Copy link
Contributor Author

Waiting review 😸

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