Matthew Sanabria
ab574da6ab
layouts: correctly check for template existence
...
https://github.com/jpanther/congo/commit/4e4b470915171a5855f3f2ea25851995aace8b55
fixed the theme for building with Hugo v0.146.0 or later but it
doesn't correctly check for template existence. That is, if you set
`homepage.layout` to `profile` this theme will still load the `page`
layout.
Hugo's [templates.Exists](https://gohugo.io/functions/templates/exists/ )
function tests for the existence of templates relative to the `layouts`
directory. The example code they provide uses `printf` to join the
template name with the `_partials` directory, which would be `partials`
instead for this theme.
```
{{ $partialPath := printf "headers/%s.html" .Type }}
{{ if templates.Exists ( printf "_partials/%s" $partialPath ) }}
{{ partial $partialPath . }}
{{ else }}
{{ partial "headers/default.html" . }}
{{ end }}
```
2025-06-21 22:29:16 -04:00
James Panther
4e4b470915
🐛 Fix for templating changes in Hugo v0.146.0 or later
...
Fixes #1049
2025-06-22 11:10:09 +10:00
Wen Junhua
86416cbe27
fix: update to also obey site settings
2024-04-30 23:07:58 +08:00
Wen Junhua
65fa14c595
Merge remote-tracking branch 'upstream/dev' into fix/772/set-to-top-elem-on-scrollable-height
2024-04-30 22:35:04 +08:00
James Panther
62a8c979b1
🎨 Code cleanup
2024-04-30 15:18:38 +10:00
James Panther
9daf083f46
🐛 Fix featured images overlap page title when metadata hidden
...
Fixes : #827
2024-04-29 15:36:19 +10:00
Wen Junhua
8f39c107eb
Merge branch 'dev' into fix/772/set-to-top-elem-on-scrollable-height
2024-03-09 12:10:25 +08:00
Tomy Hsieh
0a6267c171
🛠 fix: Space in rendered link
2024-02-22 21:36:43 -05:00
Wen Junhua
62d4d4112c
feat: add js to check height and decide if to top is required
2024-02-06 23:16:47 +08:00
James Panther
c282e97333
🔀 Merge pull request #730 from stereobooster/fix-bug-in-picture
...
fix bug in picture with params
2024-01-21 14:31:01 +11:00
pomeloy
9285958da9
Do not render article-meta figure if there is nothing to display
2024-01-21 14:25:52 +11:00
Wen Junhua
f0757d024a
fix: fix extra symbol
2023-12-30 14:26:46 +08:00
James Panther
68ce84075e
🎨 Tailwind classes cleanup
2023-12-26 11:56:32 +11:00
James Panther
6415614513
🎨 Code cleanup
2023-12-26 11:22:55 +11:00
stereobooster
f2af0198fa
fix bug in picture with params
2023-11-29 14:51:44 +01:00
stereobooster
c8b33ae51e
refactoring
2023-11-26 14:52:34 +01:00
stereobooster
0c6c30fec1
do not lazy load the feature image
2023-11-26 14:42:26 +01:00
stereobooster
6eb34e7124
use 2x instead of x2 in query params
2023-11-26 14:23:42 +01:00
stereobooster
11fd48f5d0
potential solution to screenshot
2023-11-26 14:14:49 +01:00
stereobooster
978791808f
integrate in single.html
2023-11-26 14:14:48 +01:00
stereobooster
c237e04744
Example of integration of picture partial
2023-11-26 14:14:48 +01:00
James Panther
16edb5da3b
📝 Update changelog
2023-11-26 16:25:55 +11:00
James Panther
041fc30fe9
🔀 Merge pull request #691 from stereobooster/portable-links-2
...
Print warning if system can't resolve link to a markdown file
2023-11-26 16:23:01 +11:00
James Panther
79a66d4fda
🐛 Prevent whitespace at start of render-link
...
Fixes #695
2023-11-05 10:11:04 +11:00
stereobooster
e70c968e56
Print warning if system can't resolve link to a markdown file
2023-10-31 16:54:45 +01:00
James Panther
7810026589
🐛 Fix extra whitespace added in render hooks
...
Fixed #679
2023-10-25 09:11:10 +11:00
stereobooster
95f04231af
add rel=noreferrer
2023-10-23 01:55:35 +02:00
stereobooster
74e53cc7d2
Markdown portable links
2023-09-19 06:59:55 +02:00
James Panther
5a4c8b5450
🔀 Merge pull request #645 from stereobooster/provide-width-height
...
Provide width and height for images
2023-09-12 09:46:58 +10:00
James Panther
ad8a1b0390
✨ Add new locale picker and related improvements
...
Closes : #583
2023-09-12 09:22:49 +10:00
stereobooster
30d506af0f
Provide width and height for images
2023-09-11 08:28:56 +02:00
James Panther
f34a827cea
🐛 Don't lazy load prominent images
...
Fixes : #591
2023-09-10 10:38:54 +10:00
Tomy Hsieh
0d4fe03a45
🛠 fix: Syntax error
2023-05-27 05:48:29 +08:00
Tomy Hsieh
88c73a3aae
✨ feat: Make image lazy load togglable
2023-05-27 05:31:23 +08:00
Tomy Hsieh
adf7f6f224
✨ feat: Lazy load image in all places
2023-05-27 05:26:57 +08:00
Tomy Hsieh
159aaae1e5
Merge branch 'jpanther:dev' into lazy-load-image-by-default
2023-05-27 05:17:50 +08:00
James Panther
50c5d212de
🚨 Support new language params changes in Hugo
2023-05-25 14:12:42 +10:00
Tomy Hsieh
82a44935be
✨ feat: Lazy load image by default
2023-05-08 17:04:55 +07:00
James Panther
1a9a76d532
💄 Adopt logical properties for RTL styling
2023-04-05 10:50:15 +10:00
James Panther
9e76d16476
🔀 Merge pull request #511 from uschmidt83/search-dates
...
✨ Respect `showDate` in search results
2023-03-29 15:09:16 +11:00
Uwe Schmidt
7afb18671b
Respect showDate in search results
...
Also hide date for list pages, which don't have their date shown in the theme.
2023-03-24 13:49:09 +01:00
Uwe Schmidt
5fae5fea82
Adjust whitespace for srcset links
2023-03-23 18:52:41 +01:00
James Panther
1f96038a60
🐛 Remove whitespace at EOF in render-link
...
Fixes #453
2023-01-24 08:37:50 +11:00
Tomy Hsieh
c7c9d46d52
🛠 fix: links render hook
2023-01-18 04:51:29 +08:00
James Panther
28a187895f
✨ Allow appearance switcher to be placed in menus
2023-01-17 12:58:04 +11:00
James Panther
7e970f4c97
✨ Add SVG support to article featured images
2023-01-15 10:38:53 +11:00
James Panther
af7067b86f
🚸 Add support for article images in front matter
...
Ref #381
2023-01-13 13:02:32 +11:00
James Panther
138d2bf7bb
🚸 Prevent scaling images smaller than article width
...
Fixes #394
2023-01-13 11:41:28 +11:00
Konstantin Pavlov
5e8d30c305
Fix render-image.html for SVG
...
SVG images do not support resizing, so `srcset/src` attributes should be simplified
2022-12-28 10:31:55 +02:00
James Panther
6a904413a8
🐛 Fix list page doesn't render nested list pages
...
Fixes #365
2022-11-14 13:22:15 +11:00