From bafcb6fd19320727634d09c3bd8077971fd31ffd Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Fri, 6 Nov 2020 19:44:15 +0800 Subject: [PATCH] Update blog components --- .travis.yml | 13 ++++++++----- archetypes/post/index.adoc | 9 +++++++++ assets/scss/extend.scss | 6 +++--- config.toml | 4 +++- data/more-contentful/themes/_index.yaml | 18 ++++++++++++++++++ go.mod | 2 +- go.sum | 8 ++------ layouts/_default/terms.html | 24 ++++++++++++++++++++++++ layouts/index.html | 2 +- 9 files changed, 69 insertions(+), 17 deletions(-) create mode 100644 archetypes/post/index.adoc create mode 100644 data/more-contentful/themes/_index.yaml create mode 100644 layouts/_default/terms.html diff --git a/.travis.yml b/.travis.yml index bc0619d..8e93076 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,19 +6,22 @@ language: generic git: submodules: false -# use sed to replace the SSH URL with the public URL, then init and update submodules before_install: - - sed -i 's/git@github.com:/git:\/\/github.com\//' .gitmodules - - git submodule update --init --recursive - sudo apt-get update - sudo apt-get install python3 - sudo apt-get install ruby wget - - curl https://api.github.com/repos/gohugoio/hugo/releases/latest | grep "hugo_extended.*deb" | grep "browser_download_url" | cut --delimiter=":" --delimiter="\"" --fields=4 | sudo wget -i - + - wget "https://github.com/gohugoio/hugo/releases/download/v${HUGO_RELEASE}/hugo_extended_${HUGO_RELEASE}_Linux-64bit.deb" - sudo dpkg -i *.deb - sudo gem install asciidoctor + script: - - asciidoctor --version - hugo + +env: + global: + - PRODUCTION=true + - HUGO_RELEASE=0.76.0 + deploy: local_dir: "./public/" provider: pages diff --git a/archetypes/post/index.adoc b/archetypes/post/index.adoc new file mode 100644 index 0000000..9c6c22d --- /dev/null +++ b/archetypes/post/index.adoc @@ -0,0 +1,9 @@ +--- +title: "{{ replace .Name "-" " " | humanize }}" +date: {{ .Date }} +--- + += {{ replace .Name "-" " " | humanize }} +Gabriel Arazas +{{ dateFormat "2006-01-02" .Date }} + diff --git a/assets/scss/extend.scss b/assets/scss/extend.scss index 60a7305..9065c06 100644 --- a/assets/scss/extend.scss +++ b/assets/scss/extend.scss @@ -1,5 +1,5 @@ :root { - --accented-border-style: var(--base08) solid 1px; + --accented-border-style: var(--base0C) solid 1px; } .post__meta--single { @@ -48,7 +48,7 @@ code[class*="language-"], pre[class*="language-"] { *:not(.listingblock) { > *.attribution, > *.title { - background: var(--base08); + background: var(--base0C); color: var(--base00); font-size: 0.9em; padding: 0.5em; @@ -62,7 +62,7 @@ code[class*="language-"], pre[class*="language-"] { .admonitionblock { .icon { - background: var(--base08); + background: var(--base0C); border: var(--accented-border-style); vertical-align: middle; } diff --git a/config.toml b/config.toml index 7c2d4b1..7ff15b2 100644 --- a/config.toml +++ b/config.toml @@ -3,7 +3,9 @@ languageCode = "en-us" title = "A Hack's Code" summaryLength = 0 paginate = 40 -copyright = "Unless explicitly stated, all content released here are licensed under [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0)." +copyright = """ +Unless explicitly stated, all content released here are licensed under [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/). +""" canonifyURLs = true diff --git a/data/more-contentful/themes/_index.yaml b/data/more-contentful/themes/_index.yaml new file mode 100644 index 0000000..7e67e48 --- /dev/null +++ b/data/more-contentful/themes/_index.yaml @@ -0,0 +1,18 @@ +scheme: "Bark on a tree" +author: "Gabriel Arazas (https://foo-dogsquared.github.io)" +base00: "2b221f" +base01: "412c26" +base02: "54352c" +base03: "8d5c4c" +base04: "e1bcb2" +base05: "f5ecea" +base06: "fefefe" +base07: "eb8a65" +base08: "d03e68" +base09: "eb914a" +base0A: "afa644" +base0B: "85b26e" +base0C: "df937a" #accent +base0D: "a15c40" +base0E: "8b7ab9" +base0F: "6f3920" diff --git a/go.mod b/go.mod index 7118ec7..ab5b53d 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/foo-dogsquared/blog go 1.15 require ( - github.com/foo-dogsquared/hugo-theme-more-contentful v0.1.3-0.20201105055438-9487442d647d // indirect + github.com/foo-dogsquared/hugo-theme-more-contentful v0.1.3-0.20201106102016-2fe4afef342f // indirect github.com/foo-dogsquared/hugo-web-feeds v0.0.1 // indirect github.com/simple-icons/simple-icons v0.0.0-20201025110046-413f781fd706 // indirect ) diff --git a/go.sum b/go.sum index 5bbf4f1..73e8fde 100644 --- a/go.sum +++ b/go.sum @@ -1,11 +1,7 @@ github.com/foo-dogsquared/hugo-mod-simple-icons v0.0.0-20201026173406-633714bb359d/go.mod h1:IqgEwYyo2L3mFR2RoelZZ3Ncwph7QTssrZ3deCaE0us= github.com/foo-dogsquared/hugo-theme-contentful v1.2.1-0.20201030114530-c0a2488a58fb/go.mod h1:BL7L5CENEhUx+miRRaOZ9SVC92j9MAMztirBWtTpiPc= -github.com/foo-dogsquared/hugo-theme-more-contentful v0.1.1 h1:34Ey7ysM769d8Lf2hOrTLSL5v7JpGnQyhk5NglRAP+4= -github.com/foo-dogsquared/hugo-theme-more-contentful v0.1.1/go.mod h1:rt3VJjkzt/dXRcVk8wNacnyDQfy9DwOYI45FAu4I9mw= -github.com/foo-dogsquared/hugo-theme-more-contentful v0.1.2 h1:liGphVux817iNxviDkdBLTzMXj9qkNENkNR7kUXG09A= -github.com/foo-dogsquared/hugo-theme-more-contentful v0.1.2/go.mod h1:rt3VJjkzt/dXRcVk8wNacnyDQfy9DwOYI45FAu4I9mw= -github.com/foo-dogsquared/hugo-theme-more-contentful v0.1.3-0.20201105055438-9487442d647d h1:+YilSiGzCjEm9vN1GdiIMn/Cilwf0YC2ibdDCZ43GTQ= -github.com/foo-dogsquared/hugo-theme-more-contentful v0.1.3-0.20201105055438-9487442d647d/go.mod h1:rt3VJjkzt/dXRcVk8wNacnyDQfy9DwOYI45FAu4I9mw= +github.com/foo-dogsquared/hugo-theme-more-contentful v0.1.3-0.20201106102016-2fe4afef342f h1:yH3k/eJjg3L1Y7FUAxOjhpnuWE+yIFcsCOfmrmQNi+Q= +github.com/foo-dogsquared/hugo-theme-more-contentful v0.1.3-0.20201106102016-2fe4afef342f/go.mod h1:rt3VJjkzt/dXRcVk8wNacnyDQfy9DwOYI45FAu4I9mw= github.com/foo-dogsquared/hugo-web-feeds v0.0.1 h1:miuJMx2Plw+4TBGctI2CgWXilddEHFnKNDQ9kLNti3w= github.com/foo-dogsquared/hugo-web-feeds v0.0.1/go.mod h1:0WxK3+xNIj/Wpk2kkUW0p6Uqmr/OZjPsRtQDCMazNmI= github.com/refactoringui/heroicons v0.4.2/go.mod h1:82HsLWQga7MkEl5aK8TctxPPIBlXrsyWcVTB57uipuk= diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html new file mode 100644 index 0000000..4f21d92 --- /dev/null +++ b/layouts/_default/terms.html @@ -0,0 +1,24 @@ +{{ define "main" }} +{{ .Content }} + +

{{ .Title }}

+ +{{- range .Data.Terms }} + {{- $pages := .Pages }} + {{- if ge (len $pages) 1 }} +
+

{{ .Page.Title }}

+ ({{ i18n "permalink" | default "Permalink" }}) +
+ + {{- end }} +{{- end }} + +{{ end }} diff --git a/layouts/index.html b/layouts/index.html index 71ac506..05cc6c4 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -13,7 +13,7 @@ Otherwise, we take the pages of a section. */ -}} {{- $paginator := .Paginate $pages }} {{- range $paginator.Pages }}
  • - - {{ .Title }} + - {{ .Title }}
  • {{- end }}