Compare commits
No commits in common. "64d1a830d41d60d83506efc5cbea1860e9aa8a7f" and "b32db4a4ef3f73537d5fa7321406e6a9f734efed" have entirely different histories.
64d1a830d4
...
b32db4a4ef
6 changed files with 5 additions and 60 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,4 +1,3 @@
|
||||||
build/
|
|
||||||
public/
|
public/
|
||||||
resources/_gen
|
resources/_gen
|
||||||
.hugo_build.lock
|
.hugo_build.lock
|
||||||
|
|
46
Makefile
46
Makefile
|
@ -1,46 +0,0 @@
|
||||||
BUILD_DIR ?= build
|
|
||||||
EXPORT_DIR ?= public
|
|
||||||
BUILD_STAMP_HUGO = $(BUILD_DIR)/.stamp-hugo
|
|
||||||
BUILD_STAMP_THEME = $(BUILD_DIR)/.stamp-theme
|
|
||||||
SOURCE_DIRS = content data resources static
|
|
||||||
THEME_DIR ?= themes/hugo-geekdoc
|
|
||||||
BUILD_DEPS = config.toml $(shell find $(wildcard $(SOURCE_DIRS)) -type f)
|
|
||||||
HUGO_OPTS ?= --destination=$(EXPORT_DIR)
|
|
||||||
|
|
||||||
UPLOAD_SSH_HOST = hosting.sao
|
|
||||||
UPLOAD_TARGET_DIRECTORY = /data/webserver/hilfe.systemausfall.org/public
|
|
||||||
|
|
||||||
|
|
||||||
.PHONY: help
|
|
||||||
help:
|
|
||||||
@echo "Mögliche Ziele:"
|
|
||||||
@echo " build - Webseite erzeugen"
|
|
||||||
@echo " build-theme - Theme-Assets erzeugen"
|
|
||||||
@echo " upload - erzeugte Webseite hochladen"
|
|
||||||
@echo
|
|
||||||
|
|
||||||
.PHONY: build
|
|
||||||
build: $(BUILD_STAMP_HUGO)
|
|
||||||
|
|
||||||
$(BUILD_STAMP_HUGO): $(BUILD_DEPS) $(BUILD_STAMP_THEME) Makefile
|
|
||||||
@HUGO_ENV=production hugo $(HUGO_OPTS)
|
|
||||||
@touch "$@"
|
|
||||||
|
|
||||||
.PHONY: build-theme
|
|
||||||
build-theme: $(BUILD_STAMP_THEME)
|
|
||||||
|
|
||||||
$(BUILD_STAMP_THEME):
|
|
||||||
cd "$(THEME_DIR)" \
|
|
||||||
&& npm install \
|
|
||||||
&& npm run build
|
|
||||||
touch "$@"
|
|
||||||
|
|
||||||
.PHONY: upload
|
|
||||||
upload: $(BUILD_STAMP_HUGO)
|
|
||||||
@rsync -ax --delete \
|
|
||||||
"$(EXPORT_DIR)/" \
|
|
||||||
"$(UPLOAD_SSH_HOST):$(UPLOAD_TARGET_DIRECTORY)/"
|
|
||||||
|
|
||||||
.PHONY: clean
|
|
||||||
clean:
|
|
||||||
$(RM) -r "$(BUILD_DIR)"
|
|
15
README.md
15
README.md
|
@ -15,24 +15,13 @@ Die sind die systemausfall.org-[Hilfeseiten](https://hilfe.systemausfall.org).
|
||||||
|
|
||||||
- Erzeuge einen neuen statischen build mit:
|
- Erzeuge einen neuen statischen build mit:
|
||||||
```Shell
|
```Shell
|
||||||
make build
|
hugo -D
|
||||||
```
|
```
|
||||||
- Kopiere das `public`-Verzeichnis auf den entsprechenden Webserver:
|
- Kopiere das `public`-Verzeichnis auf den entsprechenden Webserver:
|
||||||
```Shell
|
```Shell
|
||||||
make upload
|
scp -r public/ hosting.sao:/data/webserver/hilfe.systemausfall.org
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
# Build der Theme-Assets erzwingen
|
|
||||||
|
|
||||||
Nachdem die Theme-Assets initial gebaut wurden, werden spätere Änderungen nicht automatisch
|
|
||||||
erkannt.
|
|
||||||
Ein erneutes Erzeugen der Assets kann jedoch erzwungen werden:
|
|
||||||
```shell
|
|
||||||
make build-theme
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
# Theme anpassen
|
# Theme anpassen
|
||||||
|
|
||||||
1. Änderungen im Theme (in `themes/hugo-geekdoc/`) vornehmen, committen und pushen
|
1. Änderungen im Theme (in `themes/hugo-geekdoc/`) vornehmen, committen und pushen
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
---
|
---
|
||||||
title: "{{ replace .Name "-" " " | title }}"
|
title: "{{ replace .Name "-" " " | title }}"
|
||||||
date: {{ .Date }}
|
date: {{ .Date }}
|
||||||
|
draft: true
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
---
|
---
|
||||||
title: "Schnipsel"
|
title: "Schnipsel"
|
||||||
date: 2022-11-09T20:14:20+01:00
|
date: 2022-11-09T20:14:20+01:00
|
||||||
|
draft: true
|
||||||
geekdocHidden: true
|
geekdocHidden: true
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
---
|
---
|
||||||
title: "Teilen"
|
title: "Teilen"
|
||||||
date: 2022-11-07T00:12:39+01:00
|
date: 2022-11-07T00:12:39+01:00
|
||||||
|
draft: true
|
||||||
geekdocHidden: true
|
geekdocHidden: true
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue