You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2017/06/29 07:43:53 UTC

sling-site git commit: basic code highlighting using highlightjs.org

Repository: sling-site
Updated Branches:
  refs/heads/master d1a5b08e7 -> f67993ddc


basic code highlighting using highlightjs.org


Project: http://git-wip-us.apache.org/repos/asf/sling-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/sling-site/commit/f67993dd
Tree: http://git-wip-us.apache.org/repos/asf/sling-site/tree/f67993dd
Diff: http://git-wip-us.apache.org/repos/asf/sling-site/diff/f67993dd

Branch: refs/heads/master
Commit: f67993ddc5accd099ac8b6c8df30493556e3a162
Parents: d1a5b08
Author: Bertrand Delacretaz <bd...@apache.org>
Authored: Thu Jun 29 09:43:40 2017 +0200
Committer: Bertrand Delacretaz <bd...@apache.org>
Committed: Thu Jun 29 09:43:40 2017 +0200

----------------------------------------------------------------------
 src/main/jbake/templates/header.tpl | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sling-site/blob/f67993dd/src/main/jbake/templates/header.tpl
----------------------------------------------------------------------
diff --git a/src/main/jbake/templates/header.tpl b/src/main/jbake/templates/header.tpl
index dc1dec2..4695e8a 100644
--- a/src/main/jbake/templates/header.tpl
+++ b/src/main/jbake/templates/header.tpl
@@ -5,4 +5,11 @@ head {
 	// For now, try to reproduce the layout of the current website, to be able to compare pages
 	link(rel:"icon", href:"${config.site_contextPath}res/favicon.ico") newLine()
 	link(rel:"stylesheet", href:"${config.site_contextPath}res/css/site.css") newLine()
+	
+	// highlightjs.org
+	link(rel:'stylesheet', href:'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css') newLine()
+	yieldUnescaped "<script src='https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js'></script>"
+	script {
+		yield 'hljs.initHighlightingOnLoad();'
+	} newLine()
 }
\ No newline at end of file