Initial commit

This commit is contained in:
2021-06-29 00:15:47 +01:00
commit 8dd7877c87
8 changed files with 87 additions and 0 deletions

23
.github/workflows/deploy.yaml vendored Normal file
View File

@@ -0,0 +1,23 @@
name: Deploy
on:
push:
branches:
- main
jobs:
deploy:
name: Deploy
environment: production
runs-on: ubuntu-latest
steps:
- name: Deploy to target system
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.TARGET_HOST }}
username: ${{ secrets.DEPLOYMENT_USER }}
key: ${{ secrets.DEPLOYMENT_SSH_KEY }}
port: 22
script: |
cd ~/src/dimension-nikdoof
sudo git config pull.ff only
sudo git reset --hard
sudo git pull

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
public/*

17
Makefile Normal file
View File

@@ -0,0 +1,17 @@
.POSIX:
DESTDIR=~/public_gemini
.PHONY: all
all: pull build
.PHONY: pull
pull:
git pull origin
.PHONY: clean
clean:
cd $(DESTDIR) && rm -rf *
.PHONY: build
build:
${HOME}/bin/kiln build

15
config.toml Normal file
View File

@@ -0,0 +1,15 @@
title = "Example website"
urls = ["gemini://example.com"]
[feeds]
"/" = "Example feed"
[permalinks]
"/" = "/{{ .Date.Format `2006/01/02` }}/{{ path.Base .Permalink }}/"
[[tasks]]
input = [".gmi"]
output = ".gmi"
template = ".gmi"
static_dir = "static"
output_dir = "public"

3
content/_index.gmi Normal file
View File

@@ -0,0 +1,3 @@
---
title: Hello, world!
---

View File

@@ -0,0 +1,17 @@
{{ `<?xml version="1.0" encoding="utf-8"?>` | safeHTML }}
<feed xmlns="http://www.w3.org/2005/Atom">
<id>{{ index site.URLs 0 }}{{ .Permalink }}</id>
<title>{{ .Title }}</title>
<updated>{{ .Updated.Format "2006-01-02T15:04:05Z07:00" }}</updated>
<link href="{{ index site.URLs 0 | safeURL }}{{ .Permalink }}" rel="alternate"/>
{{ range .Entries }}<entry>
<id>{{ index site.URLs 0 }}{{ .Permalink }}</id>
<title>{{ .Title }}</title>
<updated>{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}</updated>
{{- $permalink := .Permalink }}
{{- range site.URLs }}
<link href="{{ . | safeURL }}{{ $permalink }}" rel="alternate"/>
{{- end }}
</entry>
{{ end -}}
</feed>

View File

@@ -0,0 +1,6 @@
# {{ .Title }}
{{ if .Content }}
{{ .Content }}{{ end }}
{{ range .Pages }}=> {{ .Permalink }} {{ if not .Date.IsZero -}}
{{.Date.Format "2006-01-02"}} {{end}}{{.Title}}
{{ end -}}

View File

@@ -0,0 +1,5 @@
# {{ .Title }}
{{- if not .Date.IsZero }}
Posted on {{ .Date.Format "2006-01-02" }}{{ end }}
{{ .Content }}