From a6eaed885c511690be117fe28fc2bd0afa0c9bfe Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Mon, 23 May 2016 17:38:13 +0100 Subject: [PATCH] Add Pygments --- .gitignore | 2 ++ scripts/build-scss.sh | 3 +++ theme/static/src/scss/index.scss | 7 +++++++ 3 files changed, 12 insertions(+) diff --git a/.gitignore b/.gitignore index 3a53396..1687001 100644 --- a/.gitignore +++ b/.gitignore @@ -61,3 +61,5 @@ target/ output/ theme/static/build/ pelican_plugins/ + +theme/static/src/scss/pygment.css diff --git a/scripts/build-scss.sh b/scripts/build-scss.sh index 8dea557..fcf0854 100755 --- a/scripts/build-scss.sh +++ b/scripts/build-scss.sh @@ -7,6 +7,9 @@ then echo ">>> WARNING: Building in Production Mode!" fi +echo ">> Generating Pygments styles..." +pygmentize -S monokai -f html -a .highlight > theme/static/src/scss/pygment.css + echo ">> Building SCSS..." node-sass theme/static/src/scss/index.scss theme/static/build/css/index.css --source-map-embed diff --git a/theme/static/src/scss/index.scss b/theme/static/src/scss/index.scss index 87e4c62..6368193 100644 --- a/theme/static/src/scss/index.scss +++ b/theme/static/src/scss/index.scss @@ -22,6 +22,7 @@ $fa-font-path: "../fonts"; /* @group Other Imports */ @import "creative/creative"; +@import "pygment"; /* @end Other Imports */ @@ -43,3 +44,9 @@ $fa-font-path: "../fonts"; .btn-primary-dark { @include button-variant($white, $brand-orange-dark, $brand-orange-dark); } + + +.highlight> pre { + background-color: transparent; + font-size: $font-size-base; +}