From c3cfb353f3dc1c183346685f94fd6ca85af45cac Mon Sep 17 00:00:00 2001 From: Tim Stallard Date: Fri, 4 Nov 2016 22:36:18 +0000 Subject: [PATCH] Added syntax highlighting with highlightjs, using agate style --- docpad.js | 1 + package.json | 1 + src/files/libs/agate.css | 108 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 110 insertions(+) create mode 100644 src/files/libs/agate.css diff --git a/docpad.js b/docpad.js index 4147994..a9165d2 100644 --- a/docpad.js +++ b/docpad.js @@ -54,6 +54,7 @@ var docpadConfig = { this.docpad.blocks["styles"].add([ "/libs/Animate.css", "/libs/fa.css", + "/libs/agate.css", "/styles.css", "https://fonts.googleapis.com/css?family=Open+Sans" ]); diff --git a/package.json b/package.json index ef5f674..f7e49d8 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "docpad-plugin-autoprefix": "~2.0.0", "docpad-plugin-cleanurls": "~2.8.1", "docpad-plugin-ejs": "~2.0.2", + "docpad-plugin-highlightjs": "~2.4.0", "docpad-plugin-livereload": "~2.7.1", "docpad-plugin-marked": "~2.3.0", "docpad-plugin-moment": "~2.0.2", diff --git a/src/files/libs/agate.css b/src/files/libs/agate.css new file mode 100644 index 0000000..8d64547 --- /dev/null +++ b/src/files/libs/agate.css @@ -0,0 +1,108 @@ +/*! + * Agate by Taufik Nurrohman + * ---------------------------------------------------- + * + * #ade5fc + * #a2fca2 + * #c6b4f0 + * #d36363 + * #fcc28c + * #fc9b9b + * #ffa + * #fff + * #333 + * #62c8f3 + * #888 + * + */ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #333; + color: white; +} + +.hljs-name, +.hljs-strong { + font-weight: bold; +} + +.hljs-code, +.hljs-emphasis { + font-style: italic; +} + +.hljs-tag { + color: #62c8f3; +} + +.hljs-variable, +.hljs-template-variable, +.hljs-selector-id, +.hljs-selector-class { + color: #ade5fc; +} + +.hljs-string, +.hljs-bullet { + color: #a2fca2; +} + +.hljs-type, +.hljs-title, +.hljs-section, +.hljs-attribute, +.hljs-quote, +.hljs-built_in, +.hljs-builtin-name { + color: #ffa; +} + +.hljs-number, +.hljs-symbol, +.hljs-bullet { + color: #d36363; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal { + color: #fcc28c; +} + +.hljs-comment, +.hljs-deletion, +.hljs-code { + color: #888; +} + +.hljs-regexp, +.hljs-link { + color: #c6b4f0; +} + +.hljs-meta { + color: #fc9b9b; +} + +.hljs-deletion { + background-color: #fc9b9b; + color: #333; +} + +.hljs-addition { + background-color: #a2fca2; + color: #333; +} + +.hljs a { + color: inherit; +} + +.hljs a:focus, +.hljs a:hover { + color: inherit; + text-decoration: underline; +}