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

Using an HTML template #5

Closed
darsnack opened this issue Dec 24, 2020 · 2 comments · Fixed by #8
Closed

Using an HTML template #5

darsnack opened this issue Dec 24, 2020 · 2 comments · Fixed by #8
Labels
bug Something isn't working

Comments

@darsnack
Copy link
Contributor

Can HTML templates be used without specifying a custom theme? I have publish.html.template.file pointing to a docs/custom.mustache, but none of the changes appear reflected in the live server. Custom CSS files appear to be working by setting publish.html.css.

@MichaelHatherly
Copy link
Owner

It should work like that, but looks like it's probably a bug in the config override order.

diff --git a/src/themes.jl b/src/themes.jl
index 4f64ead..620e0d8 100644
--- a/src/themes.jl
+++ b/src/themes.jl
@@ -45,7 +45,7 @@ function loadtheme(tree::FileTree, env::AbstractDict)
         isfile(file) || error("'$theme' theme does not exist.")
     end
     dict = TOML.parsefile(string(file))
-    env = rmerge(env, Dict("publish" => dict))
+    env = rmerge(Dict("publish" => dict), env)
     tree′ = FileTree(dirname(file))
     tree′ = FileTrees.load(tree′; lazy=LAZY[]) do file
         loadfile(env, joinpath(basename(tree′), path(file)))

If you're able to confirm the above diff fixes it that would be great.

@MichaelHatherly MichaelHatherly added the bug Something isn't working label Dec 24, 2020
@darsnack
Copy link
Contributor Author

Yes, that worked! Thank you.

darsnack referenced this issue in darsnack/Publish.jl Dec 26, 2020
darsnack referenced this issue in darsnack/Publish.jl Mar 8, 2021
MichaelHatherly added a commit that referenced this issue Mar 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants