mirror of
https://github.com/nikdoof/dimension-sh-nikdoof-web.git
synced 2025-12-18 12:19:30 +00:00
Initial commit
This commit is contained in:
23
.github/workflows/deploy.yaml
vendored
Normal file
23
.github/workflows/deploy.yaml
vendored
Normal 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
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
public/*
|
||||||
17
Makefile
Normal file
17
Makefile
Normal 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
15
config.toml
Normal 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
3
content/_index.gmi
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
title: Hello, world!
|
||||||
|
---
|
||||||
17
templates/_default/atom.xml
Normal file
17
templates/_default/atom.xml
Normal 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>
|
||||||
6
templates/_default/index.gmi
Normal file
6
templates/_default/index.gmi
Normal 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 -}}
|
||||||
5
templates/_default/page.gmi
Normal file
5
templates/_default/page.gmi
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# {{ .Title }}
|
||||||
|
{{- if not .Date.IsZero }}
|
||||||
|
Posted on {{ .Date.Format "2006-01-02" }}{{ end }}
|
||||||
|
|
||||||
|
{{ .Content }}
|
||||||
Reference in New Issue
Block a user