Skip to content
Snippets Groups Projects
Commit ce7b86cc authored by ArtOfCode-'s avatar ArtOfCode-
Browse files

Enable syntax highlighting

parent 1f0c9152
No related branches found
No related tags found
No related merge requests found
...@@ -190,3 +190,13 @@ img { ...@@ -190,3 +190,13 @@ img {
.widget.is-tertiary .widget--body + .widget--header { .widget.is-tertiary .widget--body + .widget--header {
border-top: 1px solid #9daeb7; border-top: 1px solid #9daeb7;
} }
pre {
background: #f0f0f0;
border: 0;
}
pre .hljs {
padding: 0;
background: inherit;
}
\ No newline at end of file
...@@ -27,6 +27,13 @@ ...@@ -27,6 +27,13 @@
<%= javascript_include_tag 'application' %> <%= javascript_include_tag 'application' %>
<script src="https://unpkg.com/@codidact/co-design@0.12.0/js/co-design.js" defer></script> <script src="https://unpkg.com/@codidact/co-design@0.12.0/js/co-design.js" defer></script>
<% if SiteSetting['SyntaxHighlightingEnabled'] %>
<link rel="stylesheet"
href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/styles/default.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/highlight.min.js"></script>
<script defer>hljs.initHighlightingOnLoad();</script>
<% end %>
<% if SiteSetting['MathJaxEnabled'] %> <% if SiteSetting['MathJaxEnabled'] %>
<script> <script>
MathJax = { MathJax = {
......
...@@ -284,6 +284,14 @@ ...@@ -284,6 +284,14 @@
Enable MathJax on this site for math display. This will incur a small penalty in page loading times, so consider Enable MathJax on this site for math display. This will incur a small penalty in page loading times, so consider
whether you really need it. whether you really need it.
- name: SyntaxHighlightingEnabled
value: false
value_type: boolean
category: Display
description: >
Enable highlight.js syntax highlighting on this site. This incurs a small penalty in page loading times, so consider
whether you really need it.
- name: ScoringVariable - name: ScoringVariable
value: 2 value: 2
value_type: integer value_type: integer
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment