From 5e653407f201a4fcc53f5df5a5c460a2521c64f8 Mon Sep 17 00:00:00 2001 From: Jef Roosens Date: Wed, 18 Jun 2025 12:17:49 +0200 Subject: [PATCH] chore(docs): set up initial Hugo scaffolding --- .gitmodules | 3 +++ Justfile | 3 +-- docs/.gitignore | 4 ++++ docs/Justfile | 12 ++++++++++++ docs/archetypes/default.md | 5 +++++ docs/content/_index.md | 1 + docs/hugo.toml | 4 ++++ docs/themes/hugo-book | 1 + otter.toml | 1 + 9 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 .gitmodules create mode 100644 docs/.gitignore create mode 100644 docs/Justfile create mode 100644 docs/archetypes/default.md create mode 100644 docs/content/_index.md create mode 100644 docs/hugo.toml create mode 160000 docs/themes/hugo-book diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..47029a0 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "docs/themes/hugo-book"] + path = docs/themes/hugo-book + url = https://github.com/alex-shpak/hugo-book diff --git a/Justfile b/Justfile index 1280487..c6cfb67 100644 --- a/Justfile +++ b/Justfile @@ -42,8 +42,7 @@ run: cargo run \ --bin otter \ -- serve \ - -c ./otter.toml \ - --log debug + -c ./otter.toml doc: cargo doc --workspace --frozen --open diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..9fe8a62 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,4 @@ +public/ +*.lock +*.tar.gz +/resources/_gen/ diff --git a/docs/Justfile b/docs/Justfile new file mode 100644 index 0000000..e79463d --- /dev/null +++ b/docs/Justfile @@ -0,0 +1,12 @@ +build: + hugo build --minify + +package: build + cd public && \ + tar --create \ + --gzip \ + --file ../docs.tar.gz \ + * + +serve: + hugo serve --buildDrafts diff --git a/docs/archetypes/default.md b/docs/archetypes/default.md new file mode 100644 index 0000000..25b6752 --- /dev/null +++ b/docs/archetypes/default.md @@ -0,0 +1,5 @@ ++++ +date = '{{ .Date }}' +draft = true +title = '{{ replace .File.ContentBaseName "-" " " | title }}' ++++ diff --git a/docs/content/_index.md b/docs/content/_index.md new file mode 100644 index 0000000..d8e9d74 --- /dev/null +++ b/docs/content/_index.md @@ -0,0 +1 @@ +Welcome! diff --git a/docs/hugo.toml b/docs/hugo.toml new file mode 100644 index 0000000..d3b38b4 --- /dev/null +++ b/docs/hugo.toml @@ -0,0 +1,4 @@ +baseURL = 'https://example.org/' +languageCode = 'en-us' +title = 'Otter' +theme = "hugo-book" diff --git a/docs/themes/hugo-book b/docs/themes/hugo-book new file mode 160000 index 0000000..f2c703e --- /dev/null +++ b/docs/themes/hugo-book @@ -0,0 +1 @@ +Subproject commit f2c703e155881a017cabbee17224e2dfeee0498c diff --git a/otter.toml b/otter.toml index 185fe94..70b52a4 100644 --- a/otter.toml +++ b/otter.toml @@ -1,4 +1,5 @@ data_dir = "./data" +log_level = "debug" [net] type = "tcp"