diff options
-rw-r--r-- | config.json | 4 | ||||
-rw-r--r-- | config.toml | 4 | ||||
-rw-r--r-- | config.yaml | 2 | ||||
-rw-r--r-- | content/default/messages/quickstart.md | 2 | ||||
-rw-r--r-- | themes/default/layouts/_default/home.sources.html | 2 | ||||
-rw-r--r-- | themes/default/layouts/partials/gallery-images.html | 2 | ||||
-rw-r--r-- | themes/default/layouts/partials/gallery-walk.html | 20 |
7 files changed, 25 insertions, 11 deletions
diff --git a/config.json b/config.json index ad4a10f..aca94bd 100644 --- a/config.json +++ b/config.json @@ -316,6 +316,10 @@ { "source": "public/data/generates/content", "target": "content" + }, + { + "source": "public", + "target": "assets/public" } ] } diff --git a/config.toml b/config.toml index fdfeccc..1be38e8 100644 --- a/config.toml +++ b/config.toml @@ -245,3 +245,7 @@ enableRobotsTXT = true [[module.mounts]] source = "public/data/generates/content" target = "content" + + [[module.mounts]] + source = "public" + target = "assets/public" diff --git a/config.yaml b/config.yaml index a297ded..d0fe6da 100644 --- a/config.yaml +++ b/config.yaml @@ -213,3 +213,5 @@ module: target: static/data - source: public/data/generates/content target: content + - source: public + target: assets/public diff --git a/content/default/messages/quickstart.md b/content/default/messages/quickstart.md index dc52bc3..e018bf8 100644 --- a/content/default/messages/quickstart.md +++ b/content/default/messages/quickstart.md @@ -11,7 +11,7 @@ explaining how to get started. The copy button is broken... GIT CLONE. EXECUTE HUGO TWICE. HUGO VERSION >= 0.94.2. ```shell -git clone --branch 0.4.16 https://www.thedroneely.com/git/thedroneely/canory +git clone --branch 0.5.30 https://www.thedroneely.com/git/thedroneely/canory cd canory hugo && hugo ``` diff --git a/themes/default/layouts/_default/home.sources.html b/themes/default/layouts/_default/home.sources.html index 76c00bb..fef3b49 100644 --- a/themes/default/layouts/_default/home.sources.html +++ b/themes/default/layouts/_default/home.sources.html @@ -101,7 +101,7 @@ <footer> <p> - Canory Version: 0.4.16 + Canory Version: 0.5.30 · Dictionary Access by Paul Lutus: <a href="https://arachnoid.com/javascript/dictionary_access.js">GPLv2+ License</a> · Feather Icons by Cole Bemis: <a href="https://github.com/feathericons/feather/blob/8b5d6802fa8fd1eb3924b465ff718d2fa8d61efe/LICENSE">MIT License</a> · Tabler Icons by PaweÅ‚ Kuna: <a href="https://github.com/tabler/tabler-icons/blob/60f39297d0f785f2e8635faca6857b2260b2d164/LICENSE">MIT License</a> diff --git a/themes/default/layouts/partials/gallery-images.html b/themes/default/layouts/partials/gallery-images.html index 9f5793a..de03ab0 100644 --- a/themes/default/layouts/partials/gallery-images.html +++ b/themes/default/layouts/partials/gallery-images.html @@ -1,4 +1,4 @@ -{{ $folder := print "/content/" (partial "author-user.html" .) "/media/" }} +{{ $folder := print "public/" (partial "author-user.html" .) "/media/" }} <gallery-images> <h1>Picture Gallery</h1> diff --git a/themes/default/layouts/partials/gallery-walk.html b/themes/default/layouts/partials/gallery-walk.html index d6d988a..3e9dabf 100644 --- a/themes/default/layouts/partials/gallery-walk.html +++ b/themes/default/layouts/partials/gallery-walk.html @@ -3,11 +3,12 @@ {{- if fileExists $folder }} {{- $files := readDir $folder }} {{- if $files }} - {{- range $files }} + {{- range first 6 $files }} {{- if not .IsDir }} {{- $name := index (split .Name ".") 0 }} {{- $extension := lower (index (split .Name ".") 1) }} + {{- $path := path.Join $folder .Name }} {{- if or (eq $extension "apng") @@ -23,13 +24,16 @@ (eq $extension "webp") }} - <img - width="100" - height="100" - title="{{- .Name }}" - alt="{{- .Name }}" - src="{{ "" | absURL }}/{{- strings.TrimPrefix "content/" (trim $folder "/") }}/{{- .Name }}" - /> + {{- with $image := resources.Get $path -}} + {{- $imageContent := (.Content | resources.FromString (print "/data/static/images/" ($image | urlize))).Resize "100x" }} + <img + alt="{{- .Name }}" + title="{{- .Name }}" + width="{{ $imageContent.Width }}" + height="{{ $imageContent.Height }}" + src="{{ $imageContent.RelPermalink }}" + /> + {{ end }} {{- end }} {{- end }} |