From 177de93b192b8ffae608e5d9ec421cc99bf68402 Mon Sep 17 00:00:00 2001 From: dmullis Date: Tue, 30 Jul 2024 22:30:00 -0700 Subject: [PATCH] Fix display of SVG output examples in README.md --- README.md | 22 +++++++++++----------- README.md.tmpl | 22 +++++++++++----------- pre-push.sh | 3 +-- 3 files changed, 23 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 1c191d5..79ecaed 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ GoAT's [README.md](README.md), then finally rendered to HTML `````` element ``` -![](//examples/trees.svg) +![](/examples/trees.svg) ### Trees -- mid-range color value Setting a foreground color in the middle of the possible range of value or luminance @@ -99,7 +99,7 @@ CSS property by from within an enclosing `` element such as are generated by Markdown. -![](//trees.mid-blue.svg) +![](/trees.mid-blue.svg) ### Overlaps ``` @@ -113,7 +113,7 @@ from within an enclosing `` element such as are generated by Markdown. '-' '-' '-' '-' '-' '-' ``` -![](//examples/overlaps.svg) +![](/examples/overlaps.svg) ### Line Decorations ``` @@ -126,7 +126,7 @@ from within an enclosing `` element such as are generated by Markdown. /\ *---------------' ``` -![](//examples/line-decorations.svg) +![](/examples/line-decorations.svg) ### Line Ends ``` @@ -143,7 +143,7 @@ from within an enclosing `` element such as are generated by Markdown. ``` -![](//examples/line-ends.svg) +![](/examples/line-ends.svg) ### Dot Grids ``` @@ -157,7 +157,7 @@ from within an enclosing `` element such as are generated by Markdown. ``` Note that '·' above is not ASCII, but rather Unicode, the MIDDLE DOT character, encoded with UTF-8. -![](//examples/dot-grids.svg) +![](/examples/dot-grids.svg) ### Large Nodes ``` @@ -172,7 +172,7 @@ Note that '·' above is not ASCII, but rather Unicode, the MIDDLE DOT character, '-' '---' '-' '---' '-' '-' '---' ``` -![](//examples/large-nodes.svg) +![](/examples/large-nodes.svg) ### Small Grids ``` @@ -211,7 +211,7 @@ Not Supported: 0123434567890123456 | ``` -![](//examples/small-grids.svg) +![](/examples/small-grids.svg) ### Big Grids ``` @@ -229,7 +229,7 @@ Not Supported: ``` -![](//examples/big-grids.svg) +![](/examples/big-grids.svg) ### Complicated ``` @@ -259,7 +259,7 @@ Not Supported: '-' '---------+--' / Nor/is this. --- ``` -![](//examples/complicated.svg) +![](/examples/complicated.svg) ### More examples are [here](examples) @@ -277,7 +277,7 @@ A nicely formatted reference may be found at [pkg.go.dev](https://pkg.go.dev/git $ go get -u github.com/blampe/goat/ ``` ### Library Data Flow -![](//goat.svg) +![](/goat.svg) The diagram above was derived by [./pre-push.sh](./pre-push.sh) from ASCII-art in the Go source file [./goat.go](./goat.go). diff --git a/README.md.tmpl b/README.md.tmpl index e329b45..7b02aef 100644 --- a/README.md.tmpl +++ b/README.md.tmpl @@ -78,7 +78,7 @@ GoAT's [README.md](README.md), then finally rendered to HTML `````` element ``` {{.trees_txt}} ``` -![]({{.Root}}/examples/trees.svg) +![](/examples/trees.svg) ### Trees -- mid-range color value Setting a foreground color in the middle of the possible range of value or luminance @@ -90,56 +90,56 @@ CSS property by from within an enclosing `` element such as are generated by Markdown. -![]({{.Root}}/trees.mid-blue.svg) +![](/trees.mid-blue.svg) ### Overlaps ``` {{.overlaps_txt}} ``` -![]({{.Root}}/examples/overlaps.svg) +![](/examples/overlaps.svg) ### Line Decorations ``` {{.line_decorations_txt}} ``` -![]({{.Root}}/examples/line-decorations.svg) +![](/examples/line-decorations.svg) ### Line Ends ``` {{.line_ends_txt}} ``` -![]({{.Root}}/examples/line-ends.svg) +![](/examples/line-ends.svg) ### Dot Grids ``` {{.dot_grids_txt}} ``` Note that '·' above is not ASCII, but rather Unicode, the MIDDLE DOT character, encoded with UTF-8. -![]({{.Root}}/examples/dot-grids.svg) +![](/examples/dot-grids.svg) ### Large Nodes ``` {{.large_nodes_txt}} ``` -![]({{.Root}}/examples/large-nodes.svg) +![](/examples/large-nodes.svg) ### Small Grids ``` {{.small_grids_txt}} ``` -![]({{.Root}}/examples/small-grids.svg) +![](/examples/small-grids.svg) ### Big Grids ``` {{.big_grids_txt}} ``` -![]({{.Root}}/examples/big-grids.svg) +![](/examples/big-grids.svg) ### Complicated ``` {{.complicated_txt}} ``` -![]({{.Root}}/examples/complicated.svg) +![](/examples/complicated.svg) ### More examples are [here](examples) @@ -157,7 +157,7 @@ A nicely formatted reference may be found at [pkg.go.dev](https://pkg.go.dev/git $ go get -u github.com/{{.Github_Repository_Owner}}/goat/ ``` ### Library Data Flow -![]({{.Root}}/goat.svg) +![](/goat.svg) The diagram above was derived by [./pre-push.sh](./pre-push.sh) from ASCII-art in the Go source file [./goat.go](./goat.go). diff --git a/pre-push.sh b/pre-push.sh index 384709a..ec0ae5d 100755 --- a/pre-push.sh +++ b/pre-push.sh @@ -42,8 +42,7 @@ then fi tmpl_expand () { - # XX Root="/" resolves to root of the repo -- consider dropping the variable. - go run ./cmd/tmpl-expand Root="/" Github_Repository_Owner=${GITHUB_REPOSITORY_OWNER} "$@" + go run ./cmd/tmpl-expand Github_Repository_Owner=${GITHUB_REPOSITORY_OWNER} "$@" } #tmpl_expand go.mod