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

Theme directory not being read #1756

Closed
parazyd opened this issue Feb 24, 2022 · 3 comments · Fixed by #1791
Closed

Theme directory not being read #1756

parazyd opened this issue Feb 24, 2022 · 3 comments · Fixed by #1791

Comments

@parazyd
Copy link

parazyd commented Feb 24, 2022

Hi. I'm trying to customize the Ayu theme, add additional fonts, and update the favicon on my mdbook instance.
However, it seems that the files aren't copied in place, and instead mdbook just spawns the default fonts and CSS files.

My directory structure looks like this:

├── book.toml
├── src
└── theme
    ├── book.js
    ├── css
    │   ├── chrome.css
    │   ├── general.css
    │   ├── print.css
    │   └── variables.css
    ├── favicon.png
    ├── favicon.svg
    ├── highlight.css
    ├── highlight.js
    └── index.hbs

I made this with mdbook init --theme, and then subsequently I'm trying to change files inside.
Not even changing the favicon results in a change, but rather the output directory contains stock files, let alone
changing something in the CSS files.

My book.toml:

[book]
authors = ["P"]
language = "en"
multilingual = false
src = "src"
title = "Book"

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

[output.katex]

[preprocessor.katex]

I'm building the book with mdbook build and viewing the HTML files with Firefox.
Does anyone know what I'm doing wrong here?

@parazyd
Copy link
Author

parazyd commented Feb 24, 2022

Also with strace, I see no calls that even look for the theme directory.

@ehuss
Copy link
Contributor

ehuss commented Feb 24, 2022

theme = "ayu" specifies the folder where the theme is located. This overrides the default of "theme". There probably should be an error or warning if it doesn't exist.

@clement2026
Copy link
Contributor

clement2026 commented Apr 24, 2022

I've made a PR #1791, which gives user an error message if theme directory does not exists.

It's been 2 months since this issue was opened. How I wish we could have more active contributors

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