Skip to content

Commit

Permalink
Merge pull request JuliaDocs#468 from mortenpi/bundle-highlightjs
Browse files Browse the repository at this point in the history
Bundle the highlight.js library, fix doctest highlighting and move MathJax and jQuery dependencies to the cdnjs CDN.
  • Loading branch information
mortenpi authored May 7, 2017
2 parents 193a9dc + c240596 commit a4506e8
Show file tree
Hide file tree
Showing 6 changed files with 3,541 additions and 21 deletions.
12 changes: 5 additions & 7 deletions assets/html/documenter.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,16 @@

requirejs.config({
paths: {
'jquery': 'https://code.jquery.com/jquery-3.1.0.js?',
'jquery': 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min',
'jqueryui': 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.0/jquery-ui.min',
'headroom': 'https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.3/headroom.min',
'mathjax': 'https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML',
'highlight': 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.5.0/highlight.min',
'highlight-julia': 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.5.0/languages/julia.min',
'mathjax': 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS_HTML',
'highlight': 'highlightjs/highlight',
},
shim: {
'mathjax' : {
exports: "MathJax"
},
'highlight-julia': ['highlight']
}
}
});

Expand Down Expand Up @@ -51,7 +49,7 @@ require(['mathjax'], function(MathJax) {
});
})

require(['jquery', 'highlight', 'highlight-julia'], function($, hljs) {
require(['jquery', 'highlight'], function($, hljs) {
$(document).ready(function() {
hljs.initHighlighting();
})
Expand Down
99 changes: 99 additions & 0 deletions assets/html/highlightjs/default.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
/*
Original highlight.js style (c) Ivan Sagalaev <[email protected]>
*/

.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #F0F0F0;
}


/* Base color: saturation 0; */

.hljs,
.hljs-subst {
color: #444;
}

.hljs-comment {
color: #888888;
}

.hljs-keyword,
.hljs-attribute,
.hljs-selector-tag,
.hljs-meta-keyword,
.hljs-doctag,
.hljs-name {
font-weight: bold;
}


/* User color: hue: 0 */

.hljs-type,
.hljs-string,
.hljs-number,
.hljs-selector-id,
.hljs-selector-class,
.hljs-quote,
.hljs-template-tag,
.hljs-deletion {
color: #880000;
}

.hljs-title,
.hljs-section {
color: #880000;
font-weight: bold;
}

.hljs-regexp,
.hljs-symbol,
.hljs-variable,
.hljs-template-variable,
.hljs-link,
.hljs-selector-attr,
.hljs-selector-pseudo {
color: #BC6060;
}


/* Language color: hue: 90; */

.hljs-literal {
color: #78A960;
}

.hljs-built_in,
.hljs-bullet,
.hljs-code,
.hljs-addition {
color: #397300;
}


/* Meta color: hue: 200 */

.hljs-meta {
color: #1f7199;
}

.hljs-meta-string {
color: #4d99bf;
}


/* Misc effects */

.hljs-emphasis {
font-style: italic;
}

.hljs-strong {
font-weight: bold;
}
Loading

0 comments on commit a4506e8

Please sign in to comment.