diff --git a/.gitignore b/.gitignore
index 3eec6c0..e40aca2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,4 @@
resources
public
+assets/css/syntax.css
+layouts/partials/openring.out.html
diff --git a/assets/openring.in.html b/assets/openring.in.html
new file mode 100644
index 0000000..c8d8f39
--- /dev/null
+++ b/assets/openring.in.html
@@ -0,0 +1,49 @@
+
+ Articles from blogs I follow around the net
+
+ {{range .Articles}}
+
+
+
{{.Summary}}
+
+ via {{.SourceTitle}}
+
+
{{.Date | datef "January 2, 2006"}}
+
+ {{end}}
+
+
+ Generated by
+ openring
+
+
+
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index ee9a386..eca08b3 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -9,4 +9,8 @@
{{ .Content | safeHTML }}
+
+
+ {{ partial "openring.out.html" . }}
+
{{ end }}
diff --git a/makefile b/makefile
index af5f8a9..c60f240 100644
--- a/makefile
+++ b/makefile
@@ -1,7 +1,13 @@
VERSION := $(shell git rev-parse --abbrev-ref HEAD)
-.PHONY: clean docker-build-dev serve write
+GOBIN = $(GOPATH)/bin
+HUGO_BIN = $(GOBIN)/hugo
+OPENRING_BIN = $(GOBIN)/openring
-write: serve
+serve: assets
+ ./hugo server -D --log -w --bind 0.0.0.0
+
+new-post:
+ @./hugo new posts/$${TITLE:new_post}.md
build: public
docker build -t vdhsn/blog:${VERSION} -f Dockerfile .
@@ -12,20 +18,33 @@ publish: build
test-publish: build
docker run -it -p 8080:80 vdhsn/blog:${VERSION}
-new-post:
- @./hugo new posts/$${TITLE:new_post}.md
-
docker-build-dev:
- @docker build --build-arg='VERSION=0.59.1' -t hugo -f Dockerfile.dev .
+ @docker build --build-arg='VERSION=0.62.0' -t hugo -f Dockerfile.dev .
-serve:
- ./hugo server -D --log -w --bind 0.0.0.0
+assets: ./assets/css/syntax.css ./layouts/partials/openring.out.html
clean:
- @rm -rf ./public ./resources
+ @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
-hugo:
+$(HUGO_BIN):
@go get -u --tags extended -v github.com/gohugoio/hugo
-public:
+$(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 \
+ -s https://drewdevault.com/feed.xml \
+ -s https://dave.cheney.net/feed/atom \
+ -s https://blog.benjojo.co.uk/rss.xml \
+ < ./assets//openring.in.html \
+ > ./layouts/partials/openring.out.html
+
+public: ./assets/css/syntax.css ./layouts/partials/openring.out.html
./hugo --minify --gc
+