diff --git a/.gitignore b/.gitignore index 7248d34..0c3a883 100644 --- a/.gitignore +++ b/.gitignore @@ -226,3 +226,4 @@ ENV/ /site # End of https://www.gitignore.io/api/hugo,node,python,jetbrains +static/src/scss/highlight.css diff --git a/Makefile b/Makefile index 411003a..7889d47 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,7 @@ build: install rm -rf $(OUTPUT_DIR) rm -rf $(STATIC_BUILD) mkdir -p $(STATIC_BUILD)/js $(STATIC_BUILD)/css + hugo gen chromastyles --style=tango > $(STATIC_SRC)/scss/highlight.css $(NODE_BIN)/browserify $(STATIC_SRC)/js/index.js -o $(STATIC_BUILD)/js/app.js $(NODE_BIN)/node-sass $(STATIC_SRC)/scss/style.scss $(STATIC_BUILD)/css/style.css --source-map-embed cp -r $(BASEDIR)/node_modules/font-awesome/fonts $(STATIC_BUILD)/fonts diff --git a/layouts/shortcodes/gist.html b/layouts/shortcodes/gist.html index c75d0d3..e4f27f3 100644 --- a/layouts/shortcodes/gist.html +++ b/layouts/shortcodes/gist.html @@ -1,3 +1,15 @@ {{ $id := default (.Get 0) .Page.Params.gist }} {{ $data := getJSON "https://api.github.com/gists/" $id }} - + +{{ range $i, $e := $data.files }} +
+ + {{ $i }} + +    + + View Raw + +
+ {{ highlight $e.content $e.language "" }} +{{ end }} diff --git a/static/src/scss/style.scss b/static/src/scss/style.scss index e0b6d3f..1625ef2 100644 --- a/static/src/scss/style.scss +++ b/static/src/scss/style.scss @@ -6,9 +6,10 @@ $fa-font-path: "../fonts"; @import "node_modules/bootstrap/scss/_transitions"; @import "node_modules/bootstrap/scss/_card"; @import "node_modules/bootstrap/scss/_badge"; -@import "node_modules/pygments-css/github"; @import "node_modules/lightgallery/src/sass/lightgallery"; +@import "highlight"; // Generated by Hugo + @import "alpha.min"; .box .box { @@ -52,6 +53,7 @@ pre code { border-radius: 0; background: none; padding: 0; + font-size: 0.75em; } code {