M .build.yml => .build.yml +19 -7
@@ 1,10 1,22 @@
-image: alpine/latest
+image: archlinux
+packages:
+ - zig-git
+sources:
+ - https://git.sr.ht/~ntgg/interpunct.me
+ - https://git.sr.ht/~ntgg/template
oauth: pages.sr.ht/PAGES:RW
environment:
- site: interpunct.me
+ site: interpunct.me
tasks:
-- package: |
- cd $site
- tar -cvz . > ../site.tar.gz
-- upload: |
- acurl -f https://pages.sr.ht/publish/$site -Fcontent=@site.tar.gz
+ - template: |
+ cd template
+ zig build -Drelease-safe
+ cp zig-out/bin/template ../$site
+ - build: |
+ cd $site
+ ./build
+ - package: |
+ cd $site
+ tar -C public -cvz . > ../site.tar.gz
+ - upload: |
+ acurl -f https://pages.sr.ht/publish/$site -Fcontent=@site.tar.gz
A .gitignore => .gitignore +1 -0
A build => build +6 -0
@@ 0,0 1,6 @@
+#!/usr/bin/env sh
+
+mkdir public
+cp main.css public/
+
+./template -sstylesheet='/main.css' -stitle='interpunct.me' -sbody="$(cat index.html)" < templates/base.html > public/index.html
M index.html => index.html +1 -17
@@ 1,18 1,4 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
- <meta charset="utf-8" />
- <meta name="viewport" content="width=device-width,initial-scale=1" />
- <meta
- name="description"
- content="interpunct's website for cool and sexy people."
- />
- <link rel="stylesheet" href="/main.css" />
- <title>interpunct.me</title>
- </head>
-
- <body>
- <div class="content">
+<div class="content">
<p>
Hello! I'm interpunct and I make stuff sometimes :). You can find all my
music on <a href="https://soundcloud.com/intrpnct">my soundcloud</a>. If
@@ 23,5 9,3 @@
<a href="https://git.sr.ht/~ntgg/">my sourcehut</a>
</p>
</div>
- </body>
-</html>
A templates/base.html => templates/base.html +16 -0
@@ 0,0 1,16 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8" />
+ <meta name="viewport" content="width=device-width,initial-scale=1" />
+ <meta
+ name="description"
+ content="interpunct's website for cool and sexy people."
+ />
+ <link rel="stylesheet" href="{% stylesheet %}" />
+ <title>{% title %}</title>
+ </head>
+ <body>
+ {% body %}
+ </body>
+</html>