Skip to content
This repository has been archived by the owner on Jul 28, 2020. It is now read-only.

Way to disable highlight.js #46

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jandamm
Copy link

@jandamm jandamm commented Jan 27, 2018

As I had the issue myself, I wanted to fix #33

It's working without breaking changes as you have to manually disable highlight.js.

A downside right now is that highlight.js is still copied into /public, but it won't be loaded by the client.

When disabling highlight.js, I noticed that style.css was messing up the code views as well. I also fixed that by only applying the code style in paragraphs.

Copied from #45, as I used the wrong 'compare'.

@@ -1,7 +1,10 @@
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="{{ "js/main.js" | absURL }}"></script>
{{ if .Site.Params.disableHighlight }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if - else could be simplified to

{{ if not .Site.Params.disableHighlight }}
   ....
{{ end }}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Server-side syntax highlighting?
2 participants