From b65d0a8507f2aa843e497bd5e125623fb424ae15 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Tue, 19 Jun 2018 20:12:38 +0100 Subject: [PATCH] Remove inner shortcodes for util repo --- .circleci/config.yml | 3 +++ .gitmodules | 3 +++ config.yml | 9 ++++++--- layouts/shortcodes/figure.html | 14 -------------- layouts/shortcodes/iframe.html | 10 ---------- layouts/shortcodes/mermaid.html | 8 -------- layouts/shortcodes/pageparam.html | 1 - layouts/shortcodes/resource.html | 31 ------------------------------- layouts/shortcodes/siteparam.html | 1 - themes/utils | 1 + 10 files changed, 13 insertions(+), 68 deletions(-) create mode 100644 .gitmodules delete mode 100644 layouts/shortcodes/figure.html delete mode 100644 layouts/shortcodes/iframe.html delete mode 100644 layouts/shortcodes/mermaid.html delete mode 100644 layouts/shortcodes/pageparam.html delete mode 100644 layouts/shortcodes/resource.html delete mode 100644 layouts/shortcodes/siteparam.html create mode 160000 themes/utils diff --git a/.circleci/config.yml b/.circleci/config.yml index 947e39b..7eb6bf8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,6 +8,9 @@ jobs: - npm_config_loglevel: notice steps: - checkout + - run: + name: Checkout submodules + command: git submodule sync && git submodule update --init - run: name: Install Hugo command: wget https://github.com/gohugoio/hugo/releases/download/v0.41.2/hugo_0.42.1_Linux-64bit.deb -O /tmp/hugo.deb && sudo dpkg -i /tmp/hugo.deb diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..b653cfe --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "themes/utils"] + path = themes/utils + url = https://github.com/RealOrangeOne/hugo-theme-utils diff --git a/config.yml b/config.yml index 16fa0b4..8b08e16 100644 --- a/config.yml +++ b/config.yml @@ -47,8 +47,11 @@ pygmentsCodefences: true pygmentsUseClasses: true imaging: - resampleFilter: Lanczos - quality: 100 + resampleFilter: Lanczos + quality: 100 blackfriday: - smartypants: false + smartypants: false + +theme: + - utils diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html deleted file mode 100644 index 9b1dfc6..0000000 --- a/layouts/shortcodes/figure.html +++ /dev/null @@ -1,14 +0,0 @@ -{{ define "img" }} - {{ .Inner | plainify }} -{{ end }} - -{{ if .Inner }} -
- {{ template "img" . }} -
- {{ .Inner }} -
-
-{{ else }} - {{ template "img" . }} -{{ end }} diff --git a/layouts/shortcodes/iframe.html b/layouts/shortcodes/iframe.html deleted file mode 100644 index eac12a6..0000000 --- a/layouts/shortcodes/iframe.html +++ /dev/null @@ -1,10 +0,0 @@ -{{ if .Inner }} -
- -
- {{ .Inner }} View Full -
-
-{{ else }} - -{{ end }} diff --git a/layouts/shortcodes/mermaid.html b/layouts/shortcodes/mermaid.html deleted file mode 100644 index 197e07f..0000000 --- a/layouts/shortcodes/mermaid.html +++ /dev/null @@ -1,8 +0,0 @@ -
-
- {{ safeHTML .Inner }} -
-
- {{ .Get "caption" }} -
-
diff --git a/layouts/shortcodes/pageparam.html b/layouts/shortcodes/pageparam.html deleted file mode 100644 index 661452e..0000000 --- a/layouts/shortcodes/pageparam.html +++ /dev/null @@ -1 +0,0 @@ -{{ .Page.Param (.Get 0) -}} diff --git a/layouts/shortcodes/resource.html b/layouts/shortcodes/resource.html deleted file mode 100644 index d7b1a0a..0000000 --- a/layouts/shortcodes/resource.html +++ /dev/null @@ -1,31 +0,0 @@ -{{ $original := .Page.Resources.GetMatch (.Get "src") }} -{{ $options := default "1000x" (.Get "options") }} - -{{ .Scratch.Set "image" $original }} - -{{ $command := (default "Resize" (.Get "command")) }} - -{{ if eq $command "Fit"}} - {{ .Scratch.Set "image" ($original.Fit $options) }} -{{ else if eq $command "Resize"}} - {{ .Scratch.Set "image" ($original.Resize $options) }} -{{ else if eq $command "Fill"}} - {{ .Scratch.Set "image" ($original.Fill $options) }} -{{ end }} - - -{{ define "img" }} - {{ $image := .Scratch.Get "image" }} - {{ .Inner | plainify }} -{{ end }} - -{{ if .Inner }} -
- {{ template "img" . }} -
- {{ .Inner }} -
-
-{{ else }} - {{ template "img" . }} -{{ end }} diff --git a/layouts/shortcodes/siteparam.html b/layouts/shortcodes/siteparam.html deleted file mode 100644 index 4d05a0e..0000000 --- a/layouts/shortcodes/siteparam.html +++ /dev/null @@ -1 +0,0 @@ -{{ .Page.Site.Param (.Get 0) -}} diff --git a/themes/utils b/themes/utils new file mode 160000 index 0000000..5354412 --- /dev/null +++ b/themes/utils @@ -0,0 +1 @@ +Subproject commit 535441207acb5213291c5e989a9e28989d590eec