diff --git a/.gitignore b/.gitignore index 1377554..c478f8c 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ *.swp +src/public diff --git a/src/.hugo_build.lock b/src/.hugo_build.lock new file mode 100644 index 0000000..e69de29 diff --git a/src/index.html b/src/content/_index.html similarity index 77% rename from src/index.html rename to src/content/_index.html index 1aaac68..3fb5346 100644 --- a/src/index.html +++ b/src/content/_index.html @@ -1,53 +1,11 @@ - - - - - - Enroll - Reverse-engineering servers into Ansible - - - - - - - - - - - - - - - - - - - - - - +--- +title: "Enroll" +html_title: "Enroll - Reverse-engineering servers into Ansible" +description: "Enroll inspects Debian-like and RedHat-like Linux hosts and generates Ansible roles/playbooks from what it finds. Harvest → Manifest → Manage." +og_title: "Enroll - Reverse-engineering servers into Ansible" +og_description: "Harvest a host's real configuration and turn it into Ansible roles/playbooks. Safe-by-default, with optional SOPS encryption." +og_type: "website" +---
@@ -279,8 +237,8 @@ enroll explain /path/to/harvest.sops \ --format json
-
'explain' tells you why something was included, but also why something was excluded.
-
+
'explain' tells you why something was included, but also why something was excluded.
+ @@ -395,54 +353,3 @@ sudo dnf install enroll - - - - - - - - diff --git a/src/docs.html b/src/content/docs.html similarity index 87% rename from src/docs.html rename to src/content/docs.html index 60fd91b..af9b7a8 100644 --- a/src/docs.html +++ b/src/content/docs.html @@ -1,50 +1,8 @@ - - - - - - Enroll Docs - - - - - - - - - - - - - - - - - - - +--- +title: "Docs" +html_title: "Enroll Docs" +description: "How Enroll works: harvest, manifest, modes, and configuration." +---
Documentation
@@ -567,50 +525,3 @@ sudo journalctl -u enroll-harvest-diff.service -n 200 --no-pager
- - - - - - - - - - diff --git a/src/examples.html b/src/content/examples.html similarity index 59% rename from src/examples.html rename to src/content/examples.html index b5d8f9e..2cb1105 100644 --- a/src/examples.html +++ b/src/content/examples.html @@ -1,50 +1,8 @@ - - - - - - Enroll Examples - - - - - - - - - - - - - - - - - - - +--- +title: "Examples" +html_title: "Enroll Examples" +description: "Copy/paste recipes for Enroll: one host, fleets, drift detection, and safe storage." +---
Examples
@@ -168,50 +126,3 @@
- - - - - - - - - - diff --git a/src/content/schema.html b/src/content/schema.html new file mode 100644 index 0000000..5800579 --- /dev/null +++ b/src/content/schema.html @@ -0,0 +1,46 @@ +--- +title: "Schema" +html_title: "Enroll State Schema" +description: "JSON Schema describing the Enroll harvest state.json format." +layout: "schema" +--- +
+
+
Schema
+

Harvest state.json schema

+

enroll harvest generates a state file. This is its structure.

+
+
+ +
+
+
+
+
+
Links
+ +
+
+
+ +
+
+
+

state.schema.json

+ Open raw +
+ +
+ +
Loading…
+
+ +
Tip: you can validate a harvest with python -m jsonschema -i state.json schema/state.schema.json
+
+
+
+
+
diff --git a/src/security.html b/src/content/security.html similarity index 54% rename from src/security.html rename to src/content/security.html index d850a5c..c2a812b 100644 --- a/src/security.html +++ b/src/content/security.html @@ -1,50 +1,8 @@ - - - - - - Enroll Security - - - - - - - - - - - - - - - - - - - +--- +title: "Security Design" +html_title: "Enroll Security" +description: "Security posture and safe workflows for Enroll outputs." +---
Security
@@ -150,50 +108,3 @@
- - - - - - - - - - diff --git a/src/hugo.toml b/src/hugo.toml new file mode 100644 index 0000000..53735bb --- /dev/null +++ b/src/hugo.toml @@ -0,0 +1,9 @@ +baseURL = "https://enroll.sh/" +languageCode = "en-us" +title = "Enroll" +theme = "enroll-theme" +uglyURLs = true +disableKinds = ["taxonomy", "term", "RSS", "sitemap"] + +[params] + description = "Enroll inspects Debian-like and RedHat-like Linux hosts and generates Ansible roles/playbooks from what it finds. Harvest → Manifest → Manage." diff --git a/src/schema.html b/src/schema.html deleted file mode 100644 index 1d75a22..0000000 --- a/src/schema.html +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - Enroll State Schema - - - - - - - - - - - - - - - - - -
-
-
Schema
-

Harvest state.json schema

-

enroll harvest generates a state file. This is its structure.

-
-
- -
-
-
-
-
-
Links
- -
-
-
- -
-
-
-

state.schema.json

- Open raw -
- -
- -
Loading…
-
- -
Tip: you can validate a harvest with python -m jsonschema -i state.json schema/state.schema.json
-
-
-
-
-
- - - - - - - - diff --git a/src/assets/css/site.css b/src/static/assets/css/site.css similarity index 100% rename from src/assets/css/site.css rename to src/static/assets/css/site.css diff --git a/src/assets/img/enroll.svg b/src/static/assets/img/enroll.svg similarity index 100% rename from src/assets/img/enroll.svg rename to src/static/assets/img/enroll.svg diff --git a/src/assets/img/hamburger.svg b/src/static/assets/img/hamburger.svg similarity index 100% rename from src/assets/img/hamburger.svg rename to src/static/assets/img/hamburger.svg diff --git a/src/assets/js/site.js b/src/static/assets/js/site.js similarity index 100% rename from src/assets/js/site.js rename to src/static/assets/js/site.js diff --git a/src/favicon.ico b/src/static/favicon.ico similarity index 100% rename from src/favicon.ico rename to src/static/favicon.ico diff --git a/src/schema/state.schema.json b/src/static/schema/state.schema.json similarity index 100% rename from src/schema/state.schema.json rename to src/static/schema/state.schema.json diff --git a/src/themes/enroll-theme/layouts/_default/baseof.html b/src/themes/enroll-theme/layouts/_default/baseof.html new file mode 100644 index 0000000..1cfc39f --- /dev/null +++ b/src/themes/enroll-theme/layouts/_default/baseof.html @@ -0,0 +1,15 @@ + + + + {{ partial "head.html" . }} + + + {{ partial "nav.html" . }} + + {{ block "main" . }}{{ end }} + + {{ partial "footer.html" . }} + {{ partial "scripts.html" . }} + {{ block "page-scripts" . }}{{ end }} + + diff --git a/src/themes/enroll-theme/layouts/_default/schema.html b/src/themes/enroll-theme/layouts/_default/schema.html new file mode 100644 index 0000000..3fd54f3 --- /dev/null +++ b/src/themes/enroll-theme/layouts/_default/schema.html @@ -0,0 +1,20 @@ +{{ define "main" }} + {{ .Content }} +{{ end }} + +{{ define "page-scripts" }} + +{{ end }} diff --git a/src/themes/enroll-theme/layouts/_default/single.html b/src/themes/enroll-theme/layouts/_default/single.html new file mode 100644 index 0000000..3a342e5 --- /dev/null +++ b/src/themes/enroll-theme/layouts/_default/single.html @@ -0,0 +1,3 @@ +{{ define "main" }} +{{ .Content | safeHTML }} +{{ end }} diff --git a/src/themes/enroll-theme/layouts/index.html b/src/themes/enroll-theme/layouts/index.html new file mode 100644 index 0000000..3a342e5 --- /dev/null +++ b/src/themes/enroll-theme/layouts/index.html @@ -0,0 +1,3 @@ +{{ define "main" }} +{{ .Content | safeHTML }} +{{ end }} diff --git a/src/themes/enroll-theme/layouts/partials/footer.html b/src/themes/enroll-theme/layouts/partials/footer.html new file mode 100644 index 0000000..3ab6587 --- /dev/null +++ b/src/themes/enroll-theme/layouts/partials/footer.html @@ -0,0 +1,63 @@ + diff --git a/src/themes/enroll-theme/layouts/partials/head.html b/src/themes/enroll-theme/layouts/partials/head.html new file mode 100644 index 0000000..f185324 --- /dev/null +++ b/src/themes/enroll-theme/layouts/partials/head.html @@ -0,0 +1,24 @@ + + +{{ .Params.html_title }} + + +{{ with .Params.og_title }} + +{{ end }} +{{ with .Params.og_description }} + +{{ end }} +{{ with .Params.og_type }} + +{{ end }} + + + + + + + + + + diff --git a/src/themes/enroll-theme/layouts/partials/nav.html b/src/themes/enroll-theme/layouts/partials/nav.html new file mode 100644 index 0000000..3c03651 --- /dev/null +++ b/src/themes/enroll-theme/layouts/partials/nav.html @@ -0,0 +1,33 @@ + diff --git a/src/themes/enroll-theme/layouts/partials/scripts.html b/src/themes/enroll-theme/layouts/partials/scripts.html new file mode 100644 index 0000000..9c1bccb --- /dev/null +++ b/src/themes/enroll-theme/layouts/partials/scripts.html @@ -0,0 +1,8 @@ + + + diff --git a/src/themes/enroll-theme/theme.toml b/src/themes/enroll-theme/theme.toml new file mode 100644 index 0000000..da77544 --- /dev/null +++ b/src/themes/enroll-theme/theme.toml @@ -0,0 +1,6 @@ +name = "enroll-theme" +license = "MIT" +licenselink = "" +description = "Enroll theme extracted from native HTML" +homepage = "https://enroll.sh/" +min_version = "0.120.0" diff --git a/upload.sh b/upload.sh index d6e557a..0d96d5a 100755 --- a/upload.sh +++ b/upload.sh @@ -5,8 +5,11 @@ set -eou pipefail SRC="src" DEST="/opt/www/enroll.sh" -cp -a ~/git/enroll/enroll/schema/state.schema.json src/schema/state.schema.json +DEBIAN_FRONTEND=noninteractive sudo apt-get install -y --no-install-recommends hugo +cp -a ~/git/enroll/enroll/schema/state.schema.json src/static/schema/state.schema.json -rsync -aHPvz ${SRC}/ root@lupin.mig5.net:${DEST}/ +cd "${SRC}" && hugo +cd ../ +rsync -aHPvz ${SRC}/public/ root@lupin.mig5.net:${DEST}/ ssh root@lupin.mig5.net "chown -R web:web ${DEST}"