From 01b112c76fb09f5a998b3b7e4074200986f9bb4b Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Mon, 1 Feb 2021 12:34:15 +0800 Subject: [PATCH] Use the latest version of the theme --- assets/scss/extend.scss | 14 +------------- assets/templates/openring-input.html | 2 +- bin/openring-create | 23 +++++++++++++++-------- data/blogs.json | 4 +++- go.mod | 2 +- go.sum | 4 ++-- layouts/_default/archives.html | 8 ++++---- layouts/blog/list.html | 7 ++++--- shell.nix | 2 +- 9 files changed, 32 insertions(+), 34 deletions(-) diff --git a/assets/scss/extend.scss b/assets/scss/extend.scss index 7844b45..4b49d8b 100644 --- a/assets/scss/extend.scss +++ b/assets/scss/extend.scss @@ -39,19 +39,6 @@ article.post { } } -#TableOfContents { - > ul { - padding-left: 0; - list-style: none; - } - - ul ul { - list-style: none; - padding-left: 1.5em; - } -} - -// Custom layouts // Asciidoctor roles (e.g., [.text-center]) on a block. .text-center { text-align: center; @@ -61,6 +48,7 @@ article.post { text-decoration: line-through; } +// Custom layouts #logo { svg { --size: 4em; diff --git a/assets/templates/openring-input.html b/assets/templates/openring-input.html index 7180770..3f51ded 100644 --- a/assets/templates/openring-input.html +++ b/assets/templates/openring-input.html @@ -1,5 +1,5 @@
-

Posts from other blogs I follow

+

Posts from other places I follow

{{range .Articles}}
diff --git a/bin/openring-create b/bin/openring-create index beeb29d..f1c94df 100644 --- a/bin/openring-create +++ b/bin/openring-create @@ -4,7 +4,7 @@ function help() { cat << HELP Simply creates an output from an openring template. -Usage: [options] [input_file] +Usage: [options] [input_file] -- [openring_args] Options: -h, --help Help. @@ -15,6 +15,10 @@ Options: If there's no output value given, the resulting output name will be '\$INPUT.out'. -i, --input The input file path. + +You can also pass arguments to openring as if executing the +program itself by prepending them with double dash. +Make sure, they are the last one. HELP } @@ -37,23 +41,24 @@ while [[ "$#" -gt 0 ]]; do ;; -l|--limit) LIMIT="$2" - shift - shift + shift 2 ;; -d|--data) DATA="$2" - shift - shift + shift 2 ;; -o|--output) OUTPUT="$2" - shift - shift + shift 2 ;; -i|--input) INPUT_TEMPLATE="$2" + shift 2 + ;; + --) shift - shift + OPENRING_ARGS="$@" + shift $# ;; *) INPUT_TEMPLATE="$1" @@ -69,6 +74,8 @@ else OPENRING="openring"; fi +OPENRING="$OPENRING $OPENRING_ARGS"; + for feed in $(jq ".[]" "$DATA" | shuf --head-count $LIMIT); do OPENRING="$OPENRING -s $feed"; done diff --git a/data/blogs.json b/data/blogs.json index 2dd91f8..03ba2fc 100644 --- a/data/blogs.json +++ b/data/blogs.json @@ -13,5 +13,7 @@ "https://sachachua.com/blog/feed/", "http://malloc47.com/rss.xml", "https://www.copetti.org/index.xml", - "https://jvns.ca/atom.xml" + "https://jvns.ca/atom.xml", + "https://bernsteinbear.com/feed.xml", + "https://wingolog.org/feed/atom" ] diff --git a/go.mod b/go.mod index 6fbd751..a34cb62 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,6 @@ module github.com/foo-dogsquared/blog go 1.15 require ( - github.com/foo-dogsquared/hugo-theme-more-contentful v0.1.4-0.20210121010829-e0277a50bbe3 // indirect + github.com/foo-dogsquared/hugo-theme-more-contentful v0.1.4-0.20210127162407-cbaa5bdd88e9 // indirect github.com/foo-dogsquared/hugo-web-feeds v0.0.2 // indirect ) diff --git a/go.sum b/go.sum index 8ce51bc..92f28df 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ github.com/foo-dogsquared/hugo-mod-simple-icons v0.0.0-20210112174729-cd5a37e6a772/go.mod h1:Zj/H5B3seQ4WGPwEOE/LtRoMsVy7ooEB0xhUN3k9PnY= github.com/foo-dogsquared/hugo-theme-contentful v1.2.1-0.20201106111203-fd6a6c7a3839/go.mod h1:BL7L5CENEhUx+miRRaOZ9SVC92j9MAMztirBWtTpiPc= -github.com/foo-dogsquared/hugo-theme-more-contentful v0.1.4-0.20210121010829-e0277a50bbe3 h1:kIM1XMhf3U/6m9frM1dKi4SZQljUzroGb381+tLwBKI= -github.com/foo-dogsquared/hugo-theme-more-contentful v0.1.4-0.20210121010829-e0277a50bbe3/go.mod h1:zDZAiZgXJA3VWK++nLjajTaCW7Gk8DD8yUHJfNvHWxc= +github.com/foo-dogsquared/hugo-theme-more-contentful v0.1.4-0.20210127162407-cbaa5bdd88e9 h1:LlMkYLOs6msioF+LD1FornOkAOlVyj7aAOOqCKoeB+E= +github.com/foo-dogsquared/hugo-theme-more-contentful v0.1.4-0.20210127162407-cbaa5bdd88e9/go.mod h1:zDZAiZgXJA3VWK++nLjajTaCW7Gk8DD8yUHJfNvHWxc= github.com/foo-dogsquared/hugo-web-feeds v0.0.2 h1:688h38JdIvxKSTdvAFfskEM2n9VJNNNacHwlFc4lvkg= github.com/foo-dogsquared/hugo-web-feeds v0.0.2/go.mod h1:0WxK3+xNIj/Wpk2kkUW0p6Uqmr/OZjPsRtQDCMazNmI= github.com/refactoringui/heroicons v0.4.2/go.mod h1:82HsLWQga7MkEl5aK8TctxPPIBlXrsyWcVTB57uipuk= diff --git a/layouts/_default/archives.html b/layouts/_default/archives.html index 6a84fcb..4bbb555 100644 --- a/layouts/_default/archives.html +++ b/layouts/_default/archives.html @@ -12,11 +12,11 @@ {{ if ne .Key "0001" }}

{{ .Key }}

-
    +
      {{- range .Pages -}} -
    • - {{ .PublishDate.Format "2006-01-02" }} - - {{ .Title }} +
    • + {{ .PublishDate.Format "2006-01-02" }} + {{ .Title }}
    • {{- end -}}
    diff --git a/layouts/blog/list.html b/layouts/blog/list.html index 690d3d0..99f9cf4 100644 --- a/layouts/blog/list.html +++ b/layouts/blog/list.html @@ -6,11 +6,12 @@ Otherwise, we take the pages of a section. */ -}} {{- $pages := where $.Site.RegularPages "Type" "in" $.Site.Params.mainSections }} -
      +
        {{- $paginator := .Paginate $pages }} {{- range $paginator.Pages }} -
      • - - {{ .Title }} +
      • + + {{ .Title }}
      • {{- end }}
      diff --git a/shell.nix b/shell.nix index 2beddbd..4eb650b 100644 --- a/shell.nix +++ b/shell.nix @@ -47,7 +47,7 @@ mkShell { ]; shellHook = '' - chmod +x ./bin/openring-create + chmod +x ./bin --recursive go version hugo version '';