From 07facfff1146109d3334b3edde4973c547358f55 Mon Sep 17 00:00:00 2001 From: Alex Palaistras Date: Sat, 29 Oct 2022 19:46:22 +0100 Subject: [PATCH] Add module for the Grawkit playground --- content/grawkit.md | 13 +++++++++++++ content/informbot.md | 2 +- themes/go-mod/layouts/_default/single.html | 4 ++-- themes/go-mod/layouts/alias.html | 14 ++++++++++++++ themes/go-mod/layouts/partials/header.html | 2 +- 5 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 content/grawkit.md create mode 100644 themes/go-mod/layouts/alias.html diff --git a/content/grawkit.md b/content/grawkit.md new file mode 100644 index 0000000..96d881d --- /dev/null +++ b/content/grawkit.md @@ -0,0 +1,13 @@ +--- +title: Grawkit Playground +description: A live playground environment for Grawkit +module: + root_path: go.deuill.org/grawkit + sub_path: /play +repository: + type: git + http_url: https://git.deuill.org/deuill/grawkit + clone_url: https://git.deuill.org/deuill/grawkit.git +aliases: + - /grawkit/play +--- diff --git a/content/informbot.md b/content/informbot.md index 4db84b3..161091d 100644 --- a/content/informbot.md +++ b/content/informbot.md @@ -2,7 +2,7 @@ title: Informbot description: A Chat Bot for Inform 7 Stories, Built in Go module: - path: go.deuill.org/informbot + root_path: go.deuill.org/informbot repository: type: git http_url: https://git.deuill.org/deuill/informbot diff --git a/themes/go-mod/layouts/_default/single.html b/themes/go-mod/layouts/_default/single.html index 54ecc40..6efe7de 100644 --- a/themes/go-mod/layouts/_default/single.html +++ b/themes/go-mod/layouts/_default/single.html @@ -4,9 +4,9 @@

{{.Title}}

Install
-
go install {{.Params.module.path}}@latest
+
go install {{.Params.module.root_path}}{{.Params.module.sub_path}}@latest
Documentation
-
https://pkg.go.dev/{{.Params.module.path}}
+
https://pkg.go.dev/{{.Params.module.root_path}}{{.Params.module.sub_path}}
Code
{{.Params.repository.http_url}}
diff --git a/themes/go-mod/layouts/alias.html b/themes/go-mod/layouts/alias.html new file mode 100644 index 0000000..c6fbb0a --- /dev/null +++ b/themes/go-mod/layouts/alias.html @@ -0,0 +1,14 @@ + + + + {{.Page.Title}} + + + + + + + +
This is a sub-package for the {{.Page.Params.module.root_path}} module, redirecting in 5 seconds.
+ + diff --git a/themes/go-mod/layouts/partials/header.html b/themes/go-mod/layouts/partials/header.html index 4381bd4..4997c34 100644 --- a/themes/go-mod/layouts/partials/header.html +++ b/themes/go-mod/layouts/partials/header.html @@ -6,7 +6,7 @@ {{if .IsHome}}Go Modules{{else}}{{.Title}}{{end}} · {{.Site.Title}} - {{ if and (.IsPage) (.Params.module) (.Params.repository) }}{{ end }} + {{ if and (.IsPage) (.Params.module) (.Params.repository) }}{{ end }}