diff options
| -rw-r--r-- | .forgejo/workflows/build.yml | 47 | ||||
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | blog/hi.md | 10 | ||||
| -rw-r--r-- | makko.json | 32 | ||||
| -rw-r--r-- | templates/feed.html | 41 | ||||
| -rw-r--r-- | templates/post.html | 33 |
6 files changed, 164 insertions, 0 deletions
diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml new file mode 100644 index 0000000..c49bd47 --- /dev/null +++ b/.forgejo/workflows/build.yml @@ -0,0 +1,47 @@ +name: Build Blog + +on: + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + # evil hack to get makko + # mb write separate script for this? + - name: Setup Makko + run: | + curl -A "actions (compatible; Forgejo Actions; https://code.wejust.rest)" -o /usr/local/bin/makko https://our.starlightnet.work/transient/makko%20releases/makko%202.1.3-prerelease/makko-x86_64-linux + chmod +x /usr/local/bin/makko + + - name: Build blog + run: | + makko . + + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: blog-site + path: web/ + retention-days: 30 + + # evil release block + - name: Create Release + if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master') + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: blog-${{ github.sha }} + release_name: Blog Build ${{ github.sha }} + draft: false + prerelease: false + files: | + web/* diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c077218 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +web diff --git a/blog/hi.md b/blog/hi.md new file mode 100644 index 0000000..7874fd3 --- /dev/null +++ b/blog/hi.md @@ -0,0 +1,10 @@ +--- +id: uPpV-hrEEME +title: My cool post +description: Here's a post I made that is cool! +author: lain +visibility: public +created: 2026-03-15T15:17:26+00:00 +--- + +# haii
\ No newline at end of file diff --git a/makko.json b/makko.json new file mode 100644 index 0000000..b8d59da --- /dev/null +++ b/makko.json @@ -0,0 +1,32 @@ +{ + "$schema": "https://makko.starlightnet.work/schema.json", + "title": "lains blog", + "description": "STAY @ HOME SUMMER 2020", + "url": "https://blog.iwakura.page/", + "paths": { + "symlinks_enabled": false, + "cleanup_mode": "none", + "source": "blog/", + "templates": "templates/", + "output": "web/" + }, + "feeds": { + "html": "index.html", + "atom": "feed.atom", + "rss": "feed.rss" + }, + "custom": { + "hey1": "You can add anything here, then reference it in your templates", + "hey2": "or markdown files like this: {{custom.hey1}}, {{custom.hey2}}", + "note": "Any JSON input through STDIN will be overlaid on top of this." + }, + "callbacks": { + "on_change": null, + "on_create": null, + "on_delete": null, + "on_modify": null + }, + "hashes": { + "uPpV-hrEEME": "yJheHxl_-e0" + } +}
\ No newline at end of file diff --git a/templates/feed.html b/templates/feed.html new file mode 100644 index 0000000..2a7d335 --- /dev/null +++ b/templates/feed.html @@ -0,0 +1,41 @@ +<!doctype html> +<html> +<head> +<meta charset="utf-8"> +<title>{{website.title}}</title> +<!--TODO: move to external file--> +<style> + body { + font-family: monospace; + background: #000; + color: #0f0; + margin: 20px; +} + +a { + color: #0f0; + text-decoration: underline; +} + +a:hover { + background: #0f0; + color: #000; +} +</style> +</head> +<body> +<pre> + _ _ + | |__ _(_)_ _ + | / _` | | ' \ + |_\__,_|_|_||_| +</pre> + +{{#posts}} +<a href="{{url}}">{{title}}</a> - {{description}}<br> +{{/posts}} +{{^posts}} +no posts yet... +{{/posts}} +</body> +</html> diff --git a/templates/post.html b/templates/post.html new file mode 100644 index 0000000..f2a175b --- /dev/null +++ b/templates/post.html @@ -0,0 +1,33 @@ +<!doctype html> +<html> +<head> +<meta charset="utf-8"> +<title>{{post.title}}</title> +<!--TODO: move to external file--> +<style> + body { + font-family: monospace; + background: #000; + color: #0f0; + margin: 20px; +} + +a { + color: #0f0; + text-decoration: underline; +} + +a:hover { + background: #0f0; + color: #000; +} +</style> +</head> +<body> +<a href="/index.html"><- back</a> +<h1>{{post.title}}</h1> +<p>{{post.description}}</p> +<hr> +{{{post.body}}} +</body> +</html> |
