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

additional css links are not relativized correctly to pages in dirs #800

Closed
warpfork opened this issue Oct 6, 2018 · 2 comments
Closed

Comments

@warpfork
Copy link

warpfork commented Oct 6, 2018

If using output.html.additional-css, the filename given will be included at the top of all files... including, unmodified, in files in deeper directories.

This means additional-css pretty much presently doesn't work for mdbooks that use directories. :(

Workarounds

None that I've discovered.

I considered a workaround of setting additional-css = ["custom.css", "../custom.css"], but this is (sensibly enough) rejected during mdbook build because the latter file doesn't exist.

I considered a workaround of making a symlink back up to my custom css file in each dir I have, but it doesn't get copied into the site build dir, so this also doesn't work.

related

#789 is probably related.

@wirelyre
Copy link
Contributor

wirelyre commented Oct 6, 2018

If I'm reading this right, I think this is fixed in #777. (I had the same problem.) The fix should appear in the next release.

In the meantime, you can copy this file into theme/index.hbs in the root directory, the same one containing src. You might have to mkdir theme first.

@ehuss
Copy link
Contributor

ehuss commented May 17, 2019

Closing as fixed.

@ehuss ehuss closed this as completed May 17, 2019
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