parent
56c6b4ada9
commit
3b07059a31
@ -1,4 +1,9 @@
|
||||
resources
|
||||
public
|
||||
assets/css/syntax.css
|
||||
layouts/partials/openring.out.html
|
||||
|
||||
# generated by hugo gen
|
||||
assets/css/syntax.light.css
|
||||
assets/css/syntax.dark.css
|
||||
|
||||
# generated by openring
|
||||
layouts/partials/footer.html
|
||||
|
@ -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
|
||||
|
@ -0,0 +1,2 @@
|
||||
hugo extended_0.110.0
|
||||
golang 1.19
|
@ -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"]
|
@ -0,0 +1,74 @@
|
||||
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: publish-master
|
||||
publish-master: publish
|
||||
@echo 'master build detected'
|
||||
docker tag vdhsn/blog:${VERSION} vdhsn/blog:latest
|
||||
docker push vdhsn/blog:latest
|
||||
|
||||
.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: docker-build-dev
|
||||
docker-build-dev:
|
||||
@docker build --build-arg='VERSION=0.62.0' -t hugo -f Dockerfile.dev .
|
||||
|
||||
.PHONY: deploy
|
||||
deploy:
|
||||
kubectl rollout restart deployment blog
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
@rm -rf ./public ./resources ./assets/css/syntax.* ./layouts/partials/single/footer.html
|
||||
|
||||
assets: ./assets/css/syntax.light.css ./assets/css/syntax.dark.css ./layouts/partials/single/footer.html
|
||||
|
||||
HUGO_BIN = $(GOBIN)/hugo
|
||||
$(HUGO_BIN):
|
||||
@go install --tags extended github.com/gohugoio/hugo@latest
|
||||
|
||||
OPENRING_BIN = $(GOBIN)/openring
|
||||
$(OPENRING_BIN):
|
||||
@go install -v git.sr.ht/~sircmpwn/openring@latest
|
||||
|
||||
./assets/css:
|
||||
mkdir -p ./assets/css
|
||||
|
||||
./assets/css/syntax.light.css:
|
||||
hugo gen chromastyles --style=github > assets/css/syntax.light.css
|
||||
|
||||
./assets/css/syntax.dark.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://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/single/footer.html
|
||||
|
||||
public: ./assets/css/syntax.light.css ./assets/css/syntax.dark.css ./layouts/partials/openring.out.html
|
||||
hugo --minify --gc
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "{{ replace .Name "-" " " | title }}"
|
||||
date: {{ .Date }}
|
||||
date: {{ dateFormat "2006-01-02" .Date }}
|
||||
draft: true
|
||||
tags: []
|
||||
---
|
@ -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;
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
@ -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 }
|
@ -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/)
|
@ -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
|
@ -0,0 +1,5 @@
|
||||
<div class="mermaid">
|
||||
{{- .Inner | safeHTML }}
|
||||
</div>
|
||||
{{ .Page.Store.Set "hasMermaid" true }}
|
||||
|
@ -1,37 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<meta name="description" content="{{if .IsHome}}{{ $.Site.Params.description }}{{else}}{{.Description}}{{end}}" />
|
||||
{{ with .OutputFormats.Get "RSS" }}
|
||||
<link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />
|
||||
<link href="{{ .RelPermalink }}" rel="feed" type="application/rss+xml" title="{{ $.Site.Title }}" />
|
||||
{{ end }}
|
||||
|
||||
<title>{{ .Title }}</title>
|
||||
|
||||
{{ partial "head.html" . }}
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<header id="header">
|
||||
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
|
||||
</header>
|
||||
|
||||
<div id="center">
|
||||
<div id="sidebar">
|
||||
{{ partial "navigation.html" . }}
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
{{ block "main" . }}{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer id="footer">
|
||||
{{ partial "foot.html" . }}
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,20 +0,0 @@
|
||||
{{ define "main" }}
|
||||
<section>
|
||||
{{ range .Paginator.Pages }}
|
||||
<article class="post">
|
||||
<h2>
|
||||
<span class="postdate">{{ .Date.Format "2006-01-02" }}</span>
|
||||
<a class="title" href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
{{ if .Draft }}<span>(Draft)</span>{{ end }}
|
||||
</h2>
|
||||
|
||||
<div class="post-content">
|
||||
{{ partial "tags.html" . }}
|
||||
<!-- <p>{{ .Summary | plainify | safeHTML }} {{ if .Truncated }} … {{ end }}</p> -->
|
||||
</div>
|
||||
|
||||
<!-- <p class="meta">Posted on <span class="postdate">{{ .Date.Format "02. January 2006" }}</span></p> -->
|
||||
</article>
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ end }}
|
@ -1,16 +0,0 @@
|
||||
{{ define "main" }}
|
||||
<article class="post">
|
||||
<h1 class="title"><a href="{{ .Permalink }}">{{ .Title }}</a> {{ if .Draft }}(Draft){{ end }}</h1>
|
||||
<p class="meta">
|
||||
<span class="postdate">Posted {{ .Date.Format "January 02 2006" }}</span><br/>
|
||||
{{ partial "tags.html" . }}
|
||||
</p>
|
||||
|
||||
<div class="post-content">{{ .Content | safeHTML }}</div>
|
||||
|
||||
</article>
|
||||
|
||||
<div id="openring">
|
||||
{{ partial "openring.out.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
@ -0,0 +1,21 @@
|
||||
{{ $author := or (.Site.Params.Author) (.Site.Author.name) }}
|
||||
<hr>
|
||||
<footer>
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
© {{ dateFormat "2006" now }} {{ $author }}
|
||||
</li>
|
||||
<li>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</footer>
|
||||
|
||||
{{ if .Page.Store.Get "hasMermaid" }}
|
||||
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
|
||||
<script>
|
||||
mermaid.initialize({ startOnLoad: true });
|
||||
</script>
|
||||
{{ end }}
|
||||
|
@ -1,7 +0,0 @@
|
||||
<div id="partial-footer">
|
||||
<p class="copyright">
|
||||
© 2019 - {{ now.Format "2006"}} Adam Veldhousen.
|
||||
<a href="https://creativecommons.org/licenses/by/3.0/" title="Creative Commons Attribution">Some rights reserved</a>.
|
||||
Powered by <a href="https://vdhsn.com">Hugo</a>.
|
||||
</p>
|
||||
</div>
|
@ -1,24 +0,0 @@
|
||||
<nav>
|
||||
I write software for a living and sometimes for fun.
|
||||
{{ range .Site.Menus }}
|
||||
<ul class="nav">
|
||||
{{ range . }}
|
||||
<li>
|
||||
{{ if ne .Title "" }}
|
||||
<span class="title">{{ .Title }}</span><br/>
|
||||
{{ end }}
|
||||
<a {{ if or (strings.HasSuffix .Name "github") (strings.HasSuffix .Name "keybase") }} rel="me" {{ end }}href="{{ .URL }}">
|
||||
<span>{{ .Name }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
<p id="license">
|
||||
<span class="title">License</span><br/>
|
||||
<p>
|
||||
Content on this site is <a href="https://creativecommons.org/licenses/by/3.0/">CC-BY-SA</a>.<br/>
|
||||
Code for this site is <a href="https://opensource.org/licenses/MIT">MIT</a>.
|
||||
</p>
|
||||
</p>
|
||||
</nav>
|
@ -1,9 +0,0 @@
|
||||
{{ $taxo := "tags" }} <!-- Use the plural form here -->
|
||||
<ul id="{{ $taxo }}" >
|
||||
{{ range .Param $taxo }}
|
||||
{{ $name := . }}
|
||||
{{ with $.Site.GetPage (printf "/%s/%s" $taxo ($name | urlize)) }}
|
||||
<li><a href="{{ .Permalink }}">#{{ $name }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
@ -1,2 +0,0 @@
|
||||
User-agent: *
|
||||
|
@ -1,58 +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:
|
||||
docker build -t vdhsn/blog:${VERSION} -f Dockerfile .
|
||||
|
||||
publish-master: publish
|
||||
@echo 'master build detected'
|
||||
docker tag vdhsn/blog:${VERSION} vdhsn/blog:latest
|
||||
docker push vdhsn/blog:latest
|
||||
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):
|
||||
@CGO_ENABLED=1 go get -u -v --tags extended github.com/gohugoio/hugo
|
||||
|
||||
$(OPENRING_BIN):
|
||||
@go get -u -v 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
|
||||
|
@ -1,42 +0,0 @@
|
||||
job "frontends" {
|
||||
datacenters = ["homelab"]
|
||||
|
||||
group "blog" {
|
||||
count = 2
|
||||
network {
|
||||
port "blog-http" { to = "80" }
|
||||
}
|
||||
|
||||
service {
|
||||
port = "blog-http"
|
||||
tags = [
|
||||
"traefik.http.middlewares.blog.redirectscheme.scheme=https",
|
||||
"traefik.http.middlewares.blog.redirectscheme.permanent=true",
|
||||
"traefik.http.routers.blog.entryPoints=websecure",
|
||||
"traefik.http.routers.blog.rule=Host(`vdhsn.com`, `blog.vdhsn.com`)",
|
||||
"traefik.http.routers.blog.tls.certresolver=default",
|
||||
"traefik.http.routers.blog.tls=true"
|
||||
]
|
||||
|
||||
meta {
|
||||
meta = "My Blog"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
task "blog-vdhsn" {
|
||||
driver = "docker"
|
||||
|
||||
resources {
|
||||
cpu = 128
|
||||
memory = 64
|
||||
}
|
||||
|
||||
config {
|
||||
image = "vdhsn/blog:master"
|
||||
ports = ["blog-http"]
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
@ -0,0 +1 @@
|
||||
Subproject commit 2d63ad0141c758b6331efe4aeb48d3ebbeae0b37
|
@ -1 +0,0 @@
|
||||
Subproject commit 0b8bd8f65caca1128654060d28b1808e7a4d984b
|
Loading…
Reference in new issue