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

localhost return 404 #3

Open
katopz opened this issue Oct 26, 2022 · 1 comment
Open

localhost return 404 #3

katopz opened this issue Oct 26, 2022 · 1 comment

Comments

@katopz
Copy link

katopz commented Oct 26, 2022

Step

cargo install mdbook
cargo install mdbook-theme
mdbook serve

localhost will appear 404, and when try to change something it will keep rebuild again and again infinitely.

My workaround is remove or comment out these lines in book.toml.

[output.theme-ace]
theme-white = "xcode"
theme-dark = "monokai"

then run mdbook serve again and things working fine.
Not sure what I miss.

Thanks

@zjp-CN
Copy link
Owner

zjp-CN commented Oct 26, 2022

Thanks for reporting. I have never used mdbook serve.

Another suggestion for mdbook-theme1 is:
Once you're satisfied with the theme settings like layout or font-size, comment the whole [preprocessor.theme] table and keep the theme/ dir. Otherwise files under theme/ will be always appended evey time mdbook builds.

Footnotes

  1. [preprocessor.theme] is used to generate theme/ dir before mdbook builds, and [output.theme-ace] is used to replace css in book/ dir after mdbook builds.

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

2 participants