Update blog components

This commit is contained in:
Gabriel Arazas 2020-11-06 19:44:15 +08:00
parent 382ee152a7
commit bafcb6fd19
9 changed files with 69 additions and 17 deletions

View File

@ -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

View File

@ -0,0 +1,9 @@
---
title: "{{ replace .Name "-" " " | humanize }}"
date: {{ .Date }}
---
= {{ replace .Name "-" " " | humanize }}
Gabriel Arazas <foo.dogsquared@gmail.com>
{{ dateFormat "2006-01-02" .Date }}

View File

@ -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;
}

View File

@ -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

View File

@ -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"

2
go.mod
View File

@ -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
)

8
go.sum
View File

@ -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=

View File

@ -0,0 +1,24 @@
{{ define "main" }}
{{ .Content }}
<h1>{{ .Title }}</h1>
{{- range .Data.Terms }}
{{- $pages := .Pages }}
{{- if ge (len $pages) 1 }}
<header id="{{ .Page.Title | urlize }}" class="taxonomy__header">
<h2>{{ .Page.Title }}</h2>
<small>(<a href="{{ .Page.RelPermalink }}">{{ i18n "permalink" | default "Permalink" }}</a>)</small>
</header>
<ul class="taxonomy__pages">
{{- range $pages }}
<li class="taxonomy__page">
<date datetime="{{ .PublishDate }}">{{ .PublishDate.Format "2006-01-02" }}</date>
<a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
</li>
{{- end }}
</ul>
{{- end }}
{{- end }}
{{ end }}

View File

@ -13,7 +13,7 @@ Otherwise, we take the pages of a section. */ -}}
{{- $paginator := .Paginate $pages }}
{{- range $paginator.Pages }}
<li>
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2006-01-02" }}</time> - <a href="{{ .Permalink }}" aria-label="{{ .Title }}">{{ .Title }}</a></h1>
<time datetime="{{ .PublishDate.Format "2006-01-02" }}">{{ .PublishDate.Format "2006-01-02" }}</time> - <a href="{{ .Permalink }}" aria-label="{{ .Title }}">{{ .Title }}</a></h1>
</li>
{{- end }}
</ul>