added open ring to articles
parent
af43ec5423
commit
e9e7ae17f0
|
|
@ -1,2 +1,4 @@
|
|||
resources
|
||||
public
|
||||
assets/css/syntax.css
|
||||
layouts/partials/openring.out.html
|
||||
|
|
|
|||
|
|
@ -0,0 +1,49 @@
|
|||
<section class="webring">
|
||||
<h3>Articles from blogs I follow around the net</h3>
|
||||
<section class="articles">
|
||||
{{range .Articles}}
|
||||
<div class="article">
|
||||
<h4 class="title">
|
||||
<a href="{{.Link}}" target="_blank" rel="noopener">{{.Title}}</a>
|
||||
</h4>
|
||||
<p class="summary">{{.Summary}}</p>
|
||||
<small class="source">
|
||||
via <a href="{{.SourceLink}}">{{.SourceTitle}}</a>
|
||||
</small>
|
||||
<small class="date">{{.Date | datef "January 2, 2006"}}</small>
|
||||
</div>
|
||||
{{end}}
|
||||
</section>
|
||||
<p class="attribution">
|
||||
Generated by
|
||||
<a href="https://git.sr.ht/~sircmpwn/openring">openring</a>
|
||||
</p>
|
||||
</section>
|
||||
<style>
|
||||
.webring .articles {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin: -0.5rem;
|
||||
}
|
||||
.webring .title {
|
||||
margin: 0;
|
||||
}
|
||||
.webring .article {
|
||||
flex: 1 1 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin: 0.5rem;
|
||||
padding: 0.5rem;
|
||||
background: #002a35;
|
||||
min-width: 10rem;
|
||||
}
|
||||
.webring .summary {
|
||||
font-size: 0.8rem;
|
||||
flex: 1 1 0;
|
||||
}
|
||||
.webring .attribution {
|
||||
text-align: right;
|
||||
font-size: 0.8rem;
|
||||
color: #eee;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -9,4 +9,8 @@
|
|||
<div class="post-content">{{ .Content | safeHTML }}</div>
|
||||
|
||||
</article>
|
||||
|
||||
<div id="openring">
|
||||
{{ partial "openring.out.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
|
|
|||
41
makefile
41
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
|
||||
|
||||
hugo:
|
||||
.PHONY: serve new-post build publish test-publish docker-build-dev assets clean
|
||||
|
||||
$(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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue