Use the latest version of the theme

This commit is contained in:
Gabriel Arazas 2021-02-01 12:34:15 +08:00
parent 948fa786da
commit 01b112c76f
9 changed files with 32 additions and 34 deletions

View File

@ -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. // Asciidoctor roles (e.g., [.text-center]) on a block.
.text-center { .text-center {
text-align: center; text-align: center;
@ -61,6 +48,7 @@ article.post {
text-decoration: line-through; text-decoration: line-through;
} }
// Custom layouts
#logo { #logo {
svg { svg {
--size: 4em; --size: 4em;

View File

@ -1,5 +1,5 @@
<section class="webring"> <section class="webring">
<h3>Posts from other blogs I follow</h3> <h3>Posts from other places I follow</h3>
<section class="articles"> <section class="articles">
{{range .Articles}} {{range .Articles}}
<div class="webring__article"> <div class="webring__article">

View File

@ -4,7 +4,7 @@ function help() {
cat << HELP cat << HELP
Simply creates an output from an openring template. Simply creates an output from an openring template.
Usage: [options] [input_file] Usage: [options] [input_file] -- [openring_args]
Options: Options:
-h, --help Help. -h, --help Help.
@ -15,6 +15,10 @@ Options:
If there's no output value given, the resulting If there's no output value given, the resulting
output name will be '\$INPUT.out'. output name will be '\$INPUT.out'.
-i, --input The input file path. -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 HELP
} }
@ -37,23 +41,24 @@ while [[ "$#" -gt 0 ]]; do
;; ;;
-l|--limit) -l|--limit)
LIMIT="$2" LIMIT="$2"
shift shift 2
shift
;; ;;
-d|--data) -d|--data)
DATA="$2" DATA="$2"
shift shift 2
shift
;; ;;
-o|--output) -o|--output)
OUTPUT="$2" OUTPUT="$2"
shift shift 2
shift
;; ;;
-i|--input) -i|--input)
INPUT_TEMPLATE="$2" INPUT_TEMPLATE="$2"
shift 2
;;
--)
shift shift
shift OPENRING_ARGS="$@"
shift $#
;; ;;
*) *)
INPUT_TEMPLATE="$1" INPUT_TEMPLATE="$1"
@ -69,6 +74,8 @@ else
OPENRING="openring"; OPENRING="openring";
fi fi
OPENRING="$OPENRING $OPENRING_ARGS";
for feed in $(jq ".[]" "$DATA" | shuf --head-count $LIMIT); do for feed in $(jq ".[]" "$DATA" | shuf --head-count $LIMIT); do
OPENRING="$OPENRING -s $feed"; OPENRING="$OPENRING -s $feed";
done done

View File

@ -13,5 +13,7 @@
"https://sachachua.com/blog/feed/", "https://sachachua.com/blog/feed/",
"http://malloc47.com/rss.xml", "http://malloc47.com/rss.xml",
"https://www.copetti.org/index.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"
] ]

2
go.mod
View File

@ -3,6 +3,6 @@ module github.com/foo-dogsquared/blog
go 1.15 go 1.15
require ( 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 github.com/foo-dogsquared/hugo-web-feeds v0.0.2 // indirect
) )

4
go.sum
View File

@ -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-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-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.20210127162407-cbaa5bdd88e9 h1:LlMkYLOs6msioF+LD1FornOkAOlVyj7aAOOqCKoeB+E=
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/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 h1:688h38JdIvxKSTdvAFfskEM2n9VJNNNacHwlFc4lvkg=
github.com/foo-dogsquared/hugo-web-feeds v0.0.2/go.mod h1:0WxK3+xNIj/Wpk2kkUW0p6Uqmr/OZjPsRtQDCMazNmI= 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= github.com/refactoringui/heroicons v0.4.2/go.mod h1:82HsLWQga7MkEl5aK8TctxPPIBlXrsyWcVTB57uipuk=

View File

@ -12,11 +12,11 @@
{{ if ne .Key "0001" }} {{ if ne .Key "0001" }}
<section data-year="{{ .Key }}"> <section data-year="{{ .Key }}">
<h2 id="{{ .Key }}">{{ .Key }}</h2> <h2 id="{{ .Key }}">{{ .Key }}</h2>
<ul> <ul class="posts--list">
{{- range .Pages -}} {{- range .Pages -}}
<li> <li class="post--list">
<date>{{ .PublishDate.Format "2006-01-02" }}</date> - <date class="post--list__date">{{ .PublishDate.Format "2006-01-02" }}</date>
<a aria-label="{{ .Title }}" href="{{ .Permalink }}">{{ .Title }}</a> <a class="post--list__title" aria-label="{{ .Title }}" href="{{ .Permalink }}">{{ .Title }}</a>
</li> </li>
{{- end -}} {{- end -}}
</ul> </ul>

View File

@ -6,11 +6,12 @@
Otherwise, we take the pages of a section. */ -}} Otherwise, we take the pages of a section. */ -}}
{{- $pages := where $.Site.RegularPages "Type" "in" $.Site.Params.mainSections }} {{- $pages := where $.Site.RegularPages "Type" "in" $.Site.Params.mainSections }}
<ul> <ul class="posts--list">
{{- $paginator := .Paginate $pages }} {{- $paginator := .Paginate $pages }}
{{- range $paginator.Pages }} {{- range $paginator.Pages }}
<li> <li class="post--list">
<time datetime="{{ .PublishDate.Format "2006-01-02" }}">{{ .PublishDate.Format "2006-01-02" }}</time> - <a href="{{ .Permalink }}" aria-label="{{ .Title }}">{{ .Title }}</a></h1> <time class="post--list__date" datetime="{{ .PublishDate.Format "2006-01-02" }}">{{ .PublishDate.Format "2006-01-02" }}</time>
<a class="post--list__title" href="{{ .Permalink }}" aria-label="{{ .Title }}">{{ .Title }}</a></h1>
</li> </li>
{{- end }} {{- end }}
</ul> </ul>

View File

@ -47,7 +47,7 @@ mkShell {
]; ];
shellHook = '' shellHook = ''
chmod +x ./bin/openring-create chmod +x ./bin --recursive
go version go version
hugo version hugo version
''; '';