From 99e5b8cc8ce864b8996d5e5f771d5b4698063afa Mon Sep 17 00:00:00 2001 From: Adam Veldhousen Date: Fri, 27 Jan 2023 23:09:47 -0600 Subject: [PATCH] new theme --- .dockerignore | 10 +++ .drone.yml | 40 +++++++++ .gitignore | 11 ++- .gitmodules | 6 +- .hugo_build.lock | 0 .tool-versions | 2 + Dockerfile | 13 ++- Dockerfile.dev | 29 ------- Makefile | 56 +++++++++++++ archetypes/{ => posts}/default.md | 2 +- assets/css/layout.scss | 76 ----------------- assets/css/list.scss | 36 -------- assets/css/nav.scss | 18 ---- assets/css/syntax_edit.css | 5 -- assets/openring.in.html | 4 +- config.toml | 51 +++++------ content/about.md | 20 +++++ .../git-tips-lint-test-precommit-hook.md | 7 +- content/posts/secrets-in-makefiles.md | 4 +- hugo | 10 --- .../_markup/render-codeblock-mermaid.html | 5 ++ layouts/_default/baseof.html | 42 ---------- layouts/_default/list.html | 21 ----- layouts/_default/single.html | 16 ---- layouts/partials/base/footer.html | 21 +++++ layouts/partials/foot.html | 7 -- layouts/partials/head.html | 23 +---- layouts/partials/navigation.html | 24 ------ layouts/partials/single/footer.html | 79 ++++++++++++++++++ layouts/partials/tags.html | 9 -- layouts/robots.txt | 2 - makefile | 54 ------------ static/{party-tp.gif => favicon.gif} | Bin themes/lines | 1 + themes/solar-theme-hugo | 1 - 35 files changed, 288 insertions(+), 417 deletions(-) create mode 100644 .dockerignore create mode 100644 .drone.yml create mode 100644 .hugo_build.lock create mode 100644 .tool-versions delete mode 100644 Dockerfile.dev create mode 100644 Makefile rename archetypes/{ => posts}/default.md (97%) delete mode 100644 assets/css/layout.scss delete mode 100644 assets/css/list.scss delete mode 100644 assets/css/nav.scss delete mode 100644 assets/css/syntax_edit.css create mode 100644 content/about.md delete mode 100755 hugo create mode 100644 layouts/_default/_markup/render-codeblock-mermaid.html delete mode 100644 layouts/_default/baseof.html delete mode 100644 layouts/_default/list.html delete mode 100644 layouts/_default/single.html create mode 100644 layouts/partials/base/footer.html delete mode 100644 layouts/partials/foot.html delete mode 100644 layouts/partials/navigation.html create mode 100644 layouts/partials/single/footer.html delete mode 100644 layouts/partials/tags.html delete mode 100644 layouts/robots.txt delete mode 100644 makefile rename static/{party-tp.gif => favicon.gif} (100%) create mode 160000 themes/lines delete mode 160000 themes/solar-theme-hugo diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..6e8eaee --- /dev/null +++ b/.dockerignore @@ -0,0 +1,10 @@ +public +resources +themes + +# generated by hugo gen +assets/css/syntax.light.css +assets/css/syntax.dark.css + +# generated by openring +layouts/partials/footer.html diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..9706e96 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,40 @@ +kind: pipeline +type: kubernetes +name: Build and Publish + +trigger: + event: + - push + +steps: + - name: Build & Publish + image: plugins/kaniko + settings: + username: + from_secret: DOCKER_USERNAME + password: + from_secret: DOCKER_PASSWORD + repo: vdhsn/blog + tags: + - ${DRONE_COMMIT_SHA} + - ${DRONE_BRANCH} +--- +kind: pipeline +type: kubernetes +name: Deploy + +trigger: + event: + - promote + +steps: + - name: Publish Latest + image: plugins/kaniko + settings: + username: + from_secret: DOCKER_USERNAME + password: + from_secret: DOCKER_PASSWORD + repo: vdhsn/blog + tags: + - latest diff --git a/.gitignore b/.gitignore index e40aca2..b078eaf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,9 @@ -resources public -assets/css/syntax.css -layouts/partials/openring.out.html +resources + +# generated by hugo gen +assets/css/syntax.light.css +assets/css/syntax.dark.css + +# generated by openring +layouts/partials/single/footer.html diff --git a/.gitmodules b/.gitmodules index cf739aa..45becd8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "themes/solar-theme-hugo"] - path = themes/solar-theme-hugo - url = https://github.com/bake/solar-theme-hugo/ +[submodule "themes/lines"] + path = themes/lines + url = https://github.com/adamveld12/lines diff --git a/.hugo_build.lock b/.hugo_build.lock new file mode 100644 index 0000000..e69de29 diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..a9dd02a --- /dev/null +++ b/.tool-versions @@ -0,0 +1,2 @@ +hugo extended_0.110.0 +golang 1.19 diff --git a/Dockerfile b/Dockerfile index 71b0eda..3d98e28 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,2 +1,11 @@ -FROM nginx -COPY ./public /usr/share/nginx/html \ No newline at end of file +FROM docker.io/golang:alpine as build + +COPY . /go/src/blog +WORKDIR /go/src/blog + +RUN apk add hugo make git --no-cache \ + && go install git.sr.ht/~sircmpwn/openring@latest \ + && make public + +FROM docker.io/nginx +COPY --from=build /go/src/blog/public /usr/share/nginx/html diff --git a/Dockerfile.dev b/Dockerfile.dev deleted file mode 100644 index c6e190b..0000000 --- a/Dockerfile.dev +++ /dev/null @@ -1,29 +0,0 @@ -FROM debian:bullseye-slim - - -ARG VERSION=0.59.1 - -WORKDIR /tmp -RUN apt-get update \ - && apt-get install -y tar curl ca-certificates python3 python3-pip \ - && apt-get clean \ - && pip3 install Pygments \ - && curl https://github.com/gohugoio/hugo/releases/download/v${VERSION}/hugo_extended_${VERSION}_Linux-64bit.tar.gz -L | tar -xvz \ - && mv /tmp/hugo /usr/local/bin/hugo \ - && rm -rf /tmp/* - -RUN useradd -m -u 1000 -U -p '' -s /bin/bash hugo \ - && mkdir -p /opt/workdir \ - && chown -R 1000:1000 /home/hugo /opt/workdir /usr/local/bin/hugo - -USER 1000 - -WORKDIR /opt/workdir - -VOLUME /opt/workdir - -EXPOSE 1313 - -ENTRYPOINT /usr/local/bin/hugo - -CMD ["--help"] diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c28c110 --- /dev/null +++ b/Makefile @@ -0,0 +1,56 @@ +VERSION := $(shell git rev-parse --abbrev-ref HEAD) +GOBIN = $(shell go env GOPATH)/bin + +.PHONY: serve +serve: assets + @hugo server -D --log -w --bind 0.0.0.0 + +.PHONY: new-post +new-post: + @hugo new posts/$(TITLE).md + +.PHONY: build +build: + docker build -t vdhsn/blog:${VERSION} -f Dockerfile . + +.PHONY: clean build +publish: clean build + docker push vdhsn/blog:${VERSION} + +.PHONY: test-publish +test-publish: build + docker run -it -p 8080:80 vdhsn/blog:${VERSION} + +.PHONY: clean +clean: + @rm -rf ./public ./resources ./themes ./assets/css/syntax.* ./layouts/partials/single/footer.html + +OPENRING_BIN = $(GOBIN)/openring +$(OPENRING_BIN): + go install git.sr.ht/~sircmpwn/openring@latest + +public: ./themes/lines/config.toml ./assets/css/syntax.light.css ./assets/css/syntax.dark.css ./layouts/partials/single/footer.html + hugo --verbose --gc --minify --templateMetrics --templateMetricsHints --enableGitInfo --environment production + +./themes/lines/config.toml: + @git submodule update --init + +./assets/css: + @mkdir -p ./assets/css + +./assets/css/syntax.light.css: $(HUGO_BIN) ./assets/css + @hugo gen chromastyles --style=github > assets/css/syntax.light.css + +./assets/css/syntax.dark.css: $(HUGO_BIN) ./assets/css + @hugo gen chromastyles --style=github-dark > assets/css/syntax.dark.css + +./layouts/partials/single/footer.html: $(OPENRING_BIN) + @mkdir -p ./layouts/partials/single/ + $(OPENRING_BIN) \ + -s https://dave.cheney.net/feed/atom \ + -s https://tech.davis-hansson.com/index.xml \ + -s https://blog.benjojo.co.uk/rss.xml \ + -s https://drewdevault.com/feed.xml \ + < ./assets/openring.in.html \ + > ./layouts/partials/single/footer.html + diff --git a/archetypes/default.md b/archetypes/posts/default.md similarity index 97% rename from archetypes/default.md rename to archetypes/posts/default.md index ecee6bd..0b0486e 100644 --- a/archetypes/default.md +++ b/archetypes/posts/default.md @@ -1,6 +1,6 @@ --- title: "{{ replace .Name "-" " " | title }}" -date: {{ .Date }} +date: {{ dateFormat "2006-01-02" .Date }} draft: true tags: [] --- diff --git a/assets/css/layout.scss b/assets/css/layout.scss deleted file mode 100644 index 6493709..0000000 --- a/assets/css/layout.scss +++ /dev/null @@ -1,76 +0,0 @@ -@import "nav"; -@import "list"; -@import "syntax"; -@import "syntax_edit"; - -html, -body { - font-family: Verdana, Sans-Serif; - font-size: 12pt; - line-height: 1.7; -} - -h1, -h2, -h3 { - font-size: 12pt; - margin: 0 0 10px 0; -} - -p { - margin: 0 0 10px 0; - word-break: keep-all; -} - -.container { - max-width: 1280px; - margin: 0 auto; - display: flex; - flex-direction: column; - - #header { - margin-bottom: 20px; - } - - #center { - display: flex; - flex-direction: row-reverse; - width: 100%; - - #content { - flex-grow: 2; - max-width: 1010px; - } - - #sidebar { - padding-top: 20px; - padding-left: 20px; - flex-grow: 1; - min-width: 230px; - } - } - - #footer { - font-size: 0.8rem; - } -} - -@media (max-width: 1280px) { - .container { - #center { - flex-direction: column-reverse; - #content { - max-width: 100%; - } - } - } -} - -.highlight { - line-height: 1.5em; - margin: 15px 0; -} - -#openring { - margin: 35px 0; -} diff --git a/assets/css/list.scss b/assets/css/list.scss deleted file mode 100644 index d8466c3..0000000 --- a/assets/css/list.scss +++ /dev/null @@ -1,36 +0,0 @@ -.post { - #tags { - display: flex; - list-style-type: none; - padding: 0; - margin: 0 0 10px 0; - - li { - margin-right: 5px; - //background-color: black; - padding: 0 5px; - border-radius: 5px; - - a { - text-decoration: none; - &:hover { - text-decoration: underline; - text-decoration-color: #cb4b16; - } - } - } - } - - p code { - background-color: #1c1c1c; - color: #f73b3b; - } - - .postdate { - font-size: 10pt; - } - - .title { - font-size: 16pt; - } -} diff --git a/assets/css/nav.scss b/assets/css/nav.scss deleted file mode 100644 index 98c50d5..0000000 --- a/assets/css/nav.scss +++ /dev/null @@ -1,18 +0,0 @@ -nav { - ul { - list-style-type: none; - padding: 0; - - li { - margin-bottom: 10px; - } - } - - .title { - font-size: 0.9rem; - } -} - -#license { - font-size: 1rem; -} diff --git a/assets/css/syntax_edit.css b/assets/css/syntax_edit.css deleted file mode 100644 index f32b073..0000000 --- a/assets/css/syntax_edit.css +++ /dev/null @@ -1,5 +0,0 @@ -/* LineHighlight */ .chroma .hl { background-color: white; color: black } -/* Comment */ .chroma .c { color: white } -/* CommentHashbang */ .chroma .ch { color: white } -/* CommentMultiline */ .chroma .cm { color: white } -/* CommentSingle */ .chroma .c1 { color: white } \ No newline at end of file diff --git a/assets/openring.in.html b/assets/openring.in.html index c8d8f39..fd4ad3b 100644 --- a/assets/openring.in.html +++ b/assets/openring.in.html @@ -1,5 +1,5 @@
-

Articles from blogs I follow around the net

+

Articles from blogs I follow

{{range .Articles}}
@@ -34,7 +34,6 @@ flex-direction: column; margin: 0.5rem; padding: 0.5rem; - background: #002a35; min-width: 10rem; } .webring .summary { @@ -44,6 +43,5 @@ .webring .attribution { text-align: right; font-size: 0.8rem; - color: #eee; } diff --git a/config.toml b/config.toml index 6193bcb..d9a3dc6 100644 --- a/config.toml +++ b/config.toml @@ -1,51 +1,44 @@ baseURL = "https://vdhsn.com" -languageCode = "en-us" -title = "Adam's Blog" -theme = "solar-theme-hugo" -pygmentsStyle = "solarized-dark256" # solarized-light, -dark or -dark256 +title = "VDHSN" +theme = "lines" summaryLength = 32 enableRobotsTXT = true enableEmoji = true +ignoreErrors = ["error-missing-instagram-accesstoken"] [params] author = "Adam Veldhousen" + email = "adam@vdhsn.com" description = "I write software for a living and sometimes for fun. Copyright 2019 Adam Veldhousen" + theme = "light" [menu] [[menu.main]] - title ="Email" - name = "adam@vdhsn.com" - url = "mailto:adam@vdhsn.com" - weight = -100 + name = "VDHSN" + title = "VDHSN" + url = "/" + weight = -10 [[menu.main]] - title = "PGP" - name = "A466CEE1415C0B9C" - url = "/gpg.pub" - weight = 0 + name = "About" + url = "/about" + weight = -5 [[menu.main]] - Title = "Code for this site" - name = "git.vdhsn.com/adam/blog" + name = "Source" url = "https://git.vdhsn.com/adam/blog" - [[menu.other]] - Title = "Find me on GitHub" - name = "github.com/adamveld12" - url = "https://github.com/adamveld12" - - [[menu.other]] - Title = "Follow me on Keybase" - name = "keybase.io/aveldhousen" - url = "https://keybase.io/aveldhousen" - [[menu.other]] name = "RSS" url = "/index.xml" - [[menu.other]] - name = "Resume" - url = "/resume_2019.pdf" + + +disableKinds = ['taxonomy', 'term'] + +[taxonomies] + tag = 'tags' + [markup] [markup.highlight] @@ -53,7 +46,7 @@ enableEmoji = true guessSyntax = false lineNoStart = 1 lineNos = true - lineNumbersInTable = true + lineNumbersInTable = false noClasses = false - style = "monokai" + # style = "monokai" tabWidth = 4 \ No newline at end of file diff --git a/content/about.md b/content/about.md new file mode 100644 index 0000000..f5b7ac2 --- /dev/null +++ b/content/about.md @@ -0,0 +1,20 @@ +--- +title: About +hideFooter: true +--- + +Hi :wave: I'm Adam Veldhousen. This is my corner of the web where I (inconsistently) write +about technology and other passions of mine. + +- PGP [A466CEE1415C0B9C](/gpg.pub) +- [github.com/adamveld12](https://github.com/adamveld12) +- [keybase.io/aveldhousen](https://keybase.io/aveldhousen) +- [linkedin.com/in/aveldhousen](https://www.linkedin.com/in/aveldhousen) +- [Resume](/resume_2019.pdf) +- [Email me](mailto:blog@vdhsn.com) + + + + + +Content on this site is [CC-BY-SA](https://creativecommons.org/licenses/by/3.0/) diff --git a/content/posts/git-tips-lint-test-precommit-hook.md b/content/posts/git-tips-lint-test-precommit-hook.md index 6744931..a130414 100755 --- a/content/posts/git-tips-lint-test-precommit-hook.md +++ b/content/posts/git-tips-lint-test-precommit-hook.md @@ -4,10 +4,10 @@ date: 2020-01-01T21:00:39Z tags: [git, bash] --- -One of my favorite inventions is a `pre-commit` hook that auto runs test and lint commands from a `makefile` or +A nice last minute sanity check I use is a `pre-commit` hook that auto runs test and lint commands from a `makefile` or `package.json` if they're found: -```bash {linenos=table} +```bash #!/usr/bin/env bash if [ -f "$PWD/makefile" ] && [ ! -z "$(cat $PWD/makefile | grep '^lint:')" ]; then @@ -27,9 +27,6 @@ elif [ -f "$PWD/package.json" ] && [ ! -z "$(cat $PWD/package.json | grep "^\"te fi ``` -The `/usr/bin/env bash` piece ensures that the script has access to all of the environment variables you expect in your -regular shell. - If the test or lint command fails then the `git commit` command fails. If I absolutely need to commit something in spite of the lint/test results I can do `git commit --no-verify` to skip the `pre-commit` hook. diff --git a/content/posts/secrets-in-makefiles.md b/content/posts/secrets-in-makefiles.md index d090aaf..a3db54b 100755 --- a/content/posts/secrets-in-makefiles.md +++ b/content/posts/secrets-in-makefiles.md @@ -11,13 +11,13 @@ with my *Make* based build setup. I found that a nice way to do this is with the The `include` command allows you to include external files to augment your makefile. First I created a `secrets.mk` and declared variables in it for my API keys. -```makefile {linenos=table} +```makefile # secrets.mk github_access_token := 'xxxxxxxxxxxxxxxxx' slack_access_token := 'xxxxxxxxxxxxxxxxx' ``` -Then in my makefile I added `include secrets.mk`. Don't forget to add `secrets.mk` to your `.gitignore`! +Then in makefile I added `include secrets.mk`. Don't forget to add `secrets.mk` to your `.gitignore`! ```makefile include secrets.mk diff --git a/hugo b/hugo deleted file mode 100755 index e8d55bc..0000000 --- a/hugo +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -if [ -z "$(docker ps | grep hugo)" ]; then - exec docker run -it --rm --name hugo \ - -p 1313:1313 \ - -v $PWD:/opt/workdir \ - -u 0 \ - --entrypoint=/usr/local/bin/hugo hugo $@ -else - exec docker exec -it hugo hugo $@ -fi \ No newline at end of file diff --git a/layouts/_default/_markup/render-codeblock-mermaid.html b/layouts/_default/_markup/render-codeblock-mermaid.html new file mode 100644 index 0000000..c8d3612 --- /dev/null +++ b/layouts/_default/_markup/render-codeblock-mermaid.html @@ -0,0 +1,5 @@ +
+ {{- .Inner | safeHTML }} +
+{{ .Page.Store.Set "hasMermaid" true }} + diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html deleted file mode 100644 index 33f348a..0000000 --- a/layouts/_default/baseof.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - {{ with .OutputFormats.Get "RSS" }} - - - {{ end }} - - {{ .Title }} - - {{ $style := resources.Get (printf "css/colors-%s.scss" (.Site.Params.scheme | default "dark")) | toCSS | minify | fingerprint }} - - - - - {{ partial "head.html" . }} - - -
- - -
- - -
- {{ block "main" . }}{{ end }} -
-
- -
- {{ partial "foot.html" . }} -
-
- - diff --git a/layouts/_default/list.html b/layouts/_default/list.html deleted file mode 100644 index f8713ba..0000000 --- a/layouts/_default/list.html +++ /dev/null @@ -1,21 +0,0 @@ -{{ define "main" }} -
- {{ range .Paginator.Pages }} -
-

- - {{ .Title }} - {{ if .Draft }}(Draft){{ end }} -

- -
- {{ partial "tags.html" . }} - -
- - -
- {{ end }} -
- {{ partial "pagination.html" . }} -{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html deleted file mode 100644 index eca08b3..0000000 --- a/layouts/_default/single.html +++ /dev/null @@ -1,16 +0,0 @@ -{{ define "main" }} -
-

{{ .Title }} {{ if .Draft }}(Draft){{ end }}

-

-
- {{ partial "tags.html" . }} -

- -
{{ .Content | safeHTML }}
- -
- -
- {{ partial "openring.out.html" . }} -
-{{ end }} diff --git a/layouts/partials/base/footer.html b/layouts/partials/base/footer.html new file mode 100644 index 0000000..f174954 --- /dev/null +++ b/layouts/partials/base/footer.html @@ -0,0 +1,21 @@ +{{ $author := or (.Site.Params.Author) (.Site.Author.name) }} +
+
+ +
+ +{{ if .Page.Store.Get "hasMermaid" }} + + +{{ end }} + diff --git a/layouts/partials/foot.html b/layouts/partials/foot.html deleted file mode 100644 index 4daaf26..0000000 --- a/layouts/partials/foot.html +++ /dev/null @@ -1,7 +0,0 @@ - \ No newline at end of file diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 1c4e60b..21a8e3d 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,22 +1,7 @@ - +{{ $style := resources.Get (printf "css/syntax.%s.css" (.Site.Params.theme | default "light")) | toCSS | minify | fingerprint }} - + + - + - - - - - - - - - - diff --git a/layouts/partials/navigation.html b/layouts/partials/navigation.html deleted file mode 100644 index 5af9a21..0000000 --- a/layouts/partials/navigation.html +++ /dev/null @@ -1,24 +0,0 @@ - diff --git a/layouts/partials/single/footer.html b/layouts/partials/single/footer.html new file mode 100644 index 0000000..0c51ab3 --- /dev/null +++ b/layouts/partials/single/footer.html @@ -0,0 +1,79 @@ +
+

Articles from blogs I follow

+
+ +
+

+ My plans at FOSDEM: SourceHut, Hare, and Helios +

+

FOSDEM is right around the corner, and finally in person after long years of +dealing with COVID. I’ll be there again this year, and I’m looking forward to +it! I have four slots on the schedule (wow! Thanks for arranging these, FOSDEM +team) and I’ll be talkin…

+ + via Drew DeVault's blog + + January 24, 2023 +
+ +
+

+ YSK: Google allows spoofing news headlines in search results +

+

A minor scandal unfolding in the Swedish election highlights a way to influence news narratives: +Google allows you to set headlines for news articles in search results by paying for adwords placements of legitimate articles. +This is being used by political …

+ + via Jacob Davis-Hansson + + September 9, 2022 +
+ +
+

+ Going multipath without Multipath TCP +

+

Going multipath without Multipath TCP + + + +Gigabit ethernet has been around for a long time, it’s so ubiquitous that there is a very strong chance that if you have a RJ-45 port on your compu +

+ + via benjojo blog + + February 24, 2022 +
+ +
+

+ Generated by + openring +

+
+ diff --git a/layouts/partials/tags.html b/layouts/partials/tags.html deleted file mode 100644 index dfc8436..0000000 --- a/layouts/partials/tags.html +++ /dev/null @@ -1,9 +0,0 @@ -{{ $taxo := "tags" }} -
    - {{ range .Param $taxo }} - {{ $name := . }} - {{ with $.Site.GetPage (printf "/%s/%s" $taxo ($name | urlize)) }} -
  • #{{ $name }}
  • - {{ end }} - {{ end }} -
\ No newline at end of file diff --git a/layouts/robots.txt b/layouts/robots.txt deleted file mode 100644 index 54fb989..0000000 --- a/layouts/robots.txt +++ /dev/null @@ -1,2 +0,0 @@ -User-agent: * - diff --git a/makefile b/makefile deleted file mode 100644 index 3070c75..0000000 --- a/makefile +++ /dev/null @@ -1,54 +0,0 @@ -VERSION := $(shell git rev-parse --abbrev-ref HEAD) -GOBIN = $(GOPATH)/bin -HUGO_BIN = $(GOBIN)/hugo -OPENRING_BIN = $(GOBIN)/openring - -serve: assets - ./hugo server -D --log -w --bind 0.0.0.0 - -new-post: - @./hugo new posts/$(TITLE).md - -build: public - docker build -t vdhsn/blog:${VERSION} -f Dockerfile . - -publish: clean build - docker push vdhsn/blog:${VERSION} - -test-publish: build - docker run -it -p 8080:80 vdhsn/blog:${VERSION} - -docker-build-dev: - @docker build --build-arg='VERSION=0.62.0' -t hugo -f Dockerfile.dev . - -deploy: - kubectl rollout restart deployment blog - -assets: ./assets/css/syntax.css ./layouts/partials/openring.out.html - -clean: - @rm -rf ./public ./resources ./assets/css/syntax.css ./layouts/partials/openring.out.html - -.PHONY: serve new-post build publish test-publish docker-build-dev assets clean deploy - -$(HUGO_BIN): - @go get -u --tags extended -v github.com/gohugoio/hugo - -$(OPENRING_BIN): - @go get -u git.sr.ht/~sircmpwn/openring - -./assets/css/syntax.css: - ./hugo gen chromastyles --style=solarized-dark256 > assets/css/syntax.css - -./layouts/partials/openring.out.html: $(OPENRING_BIN) - $(OPENRING_BIN) \ - -s https://drewdevault.com/feed.xml \ - -s https://dave.cheney.net/feed/atom \ - -s https://blog.benjojo.co.uk/rss.xml \ - -s https://tech.davis-hansson.com/index.xml \ - < ./assets//openring.in.html \ - > ./layouts/partials/openring.out.html - -public: ./assets/css/syntax.css ./layouts/partials/openring.out.html - ./hugo --minify --gc - diff --git a/static/party-tp.gif b/static/favicon.gif similarity index 100% rename from static/party-tp.gif rename to static/favicon.gif diff --git a/themes/lines b/themes/lines new file mode 160000 index 0000000..a85d561 --- /dev/null +++ b/themes/lines @@ -0,0 +1 @@ +Subproject commit a85d561cac091fcd73a248c3d3c426d39ac15155 diff --git a/themes/solar-theme-hugo b/themes/solar-theme-hugo deleted file mode 160000 index 0b8bd8f..0000000 --- a/themes/solar-theme-hugo +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0b8bd8f65caca1128654060d28b1808e7a4d984b