~samhh/samhh.com

602f07be5fcbf306ac6066436493e70b0efae8db — Sam A. Horvath-Hunt 8 months ago 1959f29
Add a webring
6 files changed, 44 insertions(+), 11 deletions(-)

M .build.yml
M .gitignore
M layouts/index.html
M makefile
M static/style.css
A webring.html
M .build.yml => .build.yml +15 -2
@@ 1,12 1,25 @@
image: alpine/latest
packages:
  - go
  - hugo
sources:
  - https://git.sr.ht/~samhh/samhh.com
  - https://git.sr.ht/~sircmpwn/openring
oauth: pages.sr.ht/PAGES:RW
environment:
  site: samhh.com
tasks:
- package: |
    cd $site
# sircmpwn's site's build manifest is a good reference for openring integration:
# https://git.sr.ht/~sircmpwn/drewdevault.com/tree/master/item/.build.yml
#
# NB `/usr/local/bin` isn't in Sourcehut's build environment's Alpine image's
# `$PATH`.
- openring: |
    cd openring
    go build -o openring
    sudo cp openring /usr/bin
- build: |
    cd samhh.com
    make build
    tar -C public -cvz . > ../public.tar.gz
- upload: |

M .gitignore => .gitignore +1 -0
@@ 1,3 1,4 @@
/layouts/partials/webring.html
/public/
/public.tar.gz
/.hugo_build.lock

M layouts/index.html => layouts/index.html +1 -3
@@ 9,7 9,5 @@
      {{ end }}
    </ol>

    <ul class="externals-list">
      <li><a href="https://github.com/samhh/dotfiles/blob/master/home/.config/newsboat/urls">Feeds I like</a></li>
    </ul>
    {{- partial "webring.html" . -}}
{{ end }}

M makefile => makefile +6 -0
@@ 7,4 7,10 @@ dev:
.PHONY: build
build:
	rm -rf public
	openring \
		-s https://drewdevault.com/blog/index.xml \
		-s https://lexi-lambda.github.io/feeds/all.rss.xml \
		-s https://blog.ploeh.dk/rss.xml \
		< webring.html \
		> layouts/partials/webring.html
	hugo --minify

M static/style.css => static/style.css +4 -6
@@ 88,6 88,10 @@ pre {
  }
}

.webring {
  margin: 4rem 0 0;
}

.post-list {
  list-style: none;
  padding: 0;


@@ 106,12 110,6 @@ pre {
  font-size: 1.4em;
}

.externals-list {
  list-style: none;
  margin: 4rem 0 0;
  padding: 0;
}

.software-list {
  list-style: none;
  padding: 0;

A webring.html => webring.html +17 -0
@@ 0,0 1,17 @@
<!--
  This lives outside the layouts dir so Hugo won't be upset by the likes of
  datef.
-->
<section class="webring">
  <h2>Posts from RSS feeds I like</h2>

  <ul class="post-list">
    {{range .Articles}}
      <li>
        <time dateTime="{{ .Date }}">{{ .Date | datef "January 02, 2006" }}</time>
        <br>
        <a href="{{.Link}}">{{ .Title }}</a>
      </li>
    {{end}}
  </ul>
</section>