From 1b0897ea6b1f1981582ae515283630a389c1dcb1 Mon Sep 17 00:00:00 2001 From: Andy Huynh Date: Fri, 2 Sep 2016 12:46:22 -0700 Subject: [PATCH 1/2] ALH: Add highlight js for syntax highlighting --- layouts/partials/footer_scripts.html | 8 ++++++++ layouts/partials/head_includes.html | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/layouts/partials/footer_scripts.html b/layouts/partials/footer_scripts.html index 2864a41..11df0ad 100644 --- a/layouts/partials/footer_scripts.html +++ b/layouts/partials/footer_scripts.html @@ -11,3 +11,11 @@ try { } catch(err) {} {{ end }} + +{{ if .Site.Params.HighlightJS }} + + + +{{ end }} diff --git a/layouts/partials/head_includes.html b/layouts/partials/head_includes.html index b53e4cb..5200989 100644 --- a/layouts/partials/head_includes.html +++ b/layouts/partials/head_includes.html @@ -10,6 +10,11 @@ +{{ if .Site.Params.HighlightJS }} + +{{ end }} + + {{ if eq true .Site.Params.CacheBuster }} From b3980e9d83f210ffde5f4bfb08f21ef6c9c7d882 Mon Sep 17 00:00:00 2001 From: Andy Huynh Date: Fri, 2 Sep 2016 12:52:22 -0700 Subject: [PATCH 2/2] ALH: Update example config file to include highlight js --- exampleSite/config.toml | 1 + layouts/partials/footer_scripts.html | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 5931ebb..465cd5d 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -25,6 +25,7 @@ Email = "you@example.space" FaviconFile = "img/leaf.ico" GATracker = "XYZ" GitHub = "//github.com/you" +HighlightJS = true Initials = "ad" # Displayed on single post page; DEPRECATED in v0.3.0. Lang = "en" LinkedIn = "//linkedin.com/in/you" diff --git a/layouts/partials/footer_scripts.html b/layouts/partials/footer_scripts.html index 11df0ad..a2140c0 100644 --- a/layouts/partials/footer_scripts.html +++ b/layouts/partials/footer_scripts.html @@ -13,9 +13,9 @@ try { {{ end }} {{ if .Site.Params.HighlightJS }} - + - + {{ end }}