-
Notifications
You must be signed in to change notification settings - Fork 228
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
Disabling hightlight.js #131
Comments
@Jean85 made the change last time. Hopefully they can check this out. |
Yes, I fixed one thing about it in #116. @rowing-matters can you check if you're using a version of the theme that includes that fix? |
Hi, I'm not an expert. But I think it's quite obvious, that in line 11 of footer.html the reference of the parameter is wrong. Cheers! |
Thanks for reporting this. I am actually doubling back over the entire theme to re-base the code to be more semantic and less cluttered (in addition to utilizing CSS Grid for a more responsive layout). This is on the list. 🥂 |
I'm guessing you wanted to disable it because of its cdn being from cdnboot (super slow). One way around, which I ended up doing, was changing the cdn host to cloudflare. That boosted the sites loading time from 9 seconds to 1.3 |
Expected Behavior
I tried to disable highlight.js.
Hence I set
disable_highlight = true
in config.toml. But it doesn't seem to work. I expect, that the highlight.min.js is not reference in generated html.Current Behavior
But it doesn't seem to work. I still see
<script src="//cdn.bootcss.com/highlight.js/9.11.0/highlight.min.js"></script> [...] <script>hljs.configure({languages: []}); hljs.initHighlightingOnLoad();</script>
in the generated code.Possible Solution
I guess, there's an error in line 11 of layouts/partials/footer.html:
should be
But if i correct this, I get an error "hljs is not defined". I guess the reason is line 1173 of footer.html. This should only be done "if not .Site.Params.disable_highlight".
Your Environment
Hugo Version:
Hugo Static Site Generator v0.36 linux/amd64 BuildDate: 2018-02-05T15:22:28Z
Browser:
Firefox 59.0.1
Desktop or Mobile:
Desktop
The text was updated successfully, but these errors were encountered: