Skip to content

breaking styles after change default theme #693

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

Closed
ava57r opened this issue May 14, 2018 · 4 comments
Closed

breaking styles after change default theme #693

ava57r opened this issue May 14, 2018 · 4 comments

Comments

@ava57r
Copy link

ava57r commented May 14, 2018

After change
f01bf88
f01bf88#diff-9f0d373829e789d9a6923dd290c5b174L21

Missing button icons published on github.com version of the book
39983012-dcaa8e36-575e-11e8-961a-e0f777513ca9

Book is here:
https://rurust.github.io/rust-by-example-ru/index.html

@mattico
Copy link
Contributor

mattico commented May 14, 2018

The problem is that rust-by-example's theme/index.hbs hasn't been updated for the latest mdbook changes. I think it would work with 0.1.5 or earlier. The changes I'd suggest:

  • Update RBE to newest mdbook version
  • Change RBE readme instructions to install specific mdbook version

@cauebs
Copy link
Contributor

cauebs commented May 15, 2018

I've been having this problem as well. What really bugged me was that locally it works fine, but when I push it to Github pages the icons all disappear. I just noticed it's not only me: https://rust-lang-nursery.github.io/edition-guide/

@mattico
Copy link
Contributor

mattico commented May 15, 2018

@cauebs interesting. I believe the Rust by Example issue is related to the custom theme's index.hbs not being updated for the new mdbook version, but the edition guide doesn't use any custom themeing. Does your book? Perhaps there's some other issue at play.

Downloading a complete copy of the edition from the github pages site, the _FontAwesome directory is completely missing. I assume that, since it works locally, this is a problem related to pages?

@mattico
Copy link
Contributor

mattico commented May 15, 2018

Ah, okay: https://help.github.com/articles/files-that-start-with-an-underscore-are-missing/

By default, Jekyll does not build any files or directories that

  • are hidden or used for backup (indicated by names that start with . or #, or that end with ~);
  • contain site content (indicated by names that start with _); or
  • are excluded in the site configuration.

To me this doesn't indicate that the not-built files won't end up on the target site, but that is actually the case: https://stackoverflow.com/questions/6397780

I verified this by making a github pages site and renaming the _FontAwesome directory to FontAwesome.

You can work around this at the moment by adding a .nojekyll file to your built book's root. Since mdBook is often used for github pages, we should add a workaround for this.

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

No branches or pull requests

3 participants