Joe Mooring
b6c8dfa9dc
tpl/tplimpl: Change resources.GetRemote errors to suppressible warnings
...
Closes #13803
2025-06-17 07:35:14 -07:00
Joe Mooring
81426998b8
tpl/tplimpl: Change calls to simple versions of embedded shortcodes
...
Closes #13700
2025-05-12 14:19:11 +02:00
Joe Mooring
84d7a108e8
tpl/tplimpl: Fix vimeo shortcode test to accommodate API changes
...
Fixes #13687
2025-05-09 10:02:00 -07:00
Joe Mooring
5c491409d3
tpl/tplimpl: Fix allowFullScreen option in Vimeo and YouTube shortcodes
...
Closes #13650
2025-04-24 14:14:46 -07:00
Christian Oliff
6a0e04241a
all: Fix typos
2025-04-24 10:19:17 +02:00
Joe Mooring
1e00842489
tpl/tplimpl: Update embedded pagination template
2025-04-07 21:29:53 +02:00
Bjørn Erik Pedersen
83cfdd78ca
Reimplement and simplify Hugo's template system
...
See #13541 for details.
Fixes #13545
Fixes #13515
Closes #7964
Closes #13365
Closes #12988
Closes #4891
2025-04-06 20:59:41 +02:00
Joe Mooring
6f14dbe24c
tpl/tplimpl: Fix full screen option in vimeo and youtube shortcodes
...
Closes #13531
Co-authored-by: Stefan Ritter <60473875+gideonstar-git@users.noreply.github.com >
2025-03-27 12:32:00 +01:00
Joe Mooring
b9add1c702
tpl/tplimpl: Add loading attribute to Vimeo shortcode
...
Closes #13445
2025-03-11 21:02:12 +01:00
Will Faught
eebea9ec41
tpl: Add trailing newline to robots.txt template
2025-03-05 15:02:50 +01:00
Christian Oliff
2f4e666d7e
tpl: HTTPS the instagram Shortcode JS
...
This JavaScript will always load over HTTPS so it's best to specify that. Protocol-less loaded resources are an anti-pattern (REF: https://www.paulirish.com/2010/the-protocol-relative-url/ )
2025-02-26 09:27:31 +01:00
Alex Shpak
13b208e2f7
tpl/tplimpl: Remove leading whitespaces produced by Youtube shortcode
2025-01-31 09:29:10 +01:00
Joe Mooring
f42a4b6af5
tpl/tplimpl: Deprecate gist shortcode
...
Closes #13211
2025-01-23 20:12:36 +01:00
Joe Mooring
77a8e347bc
tpl/tplimpl: Deprecate comment shortcode
2025-01-22 19:38:02 +01:00
Joe Mooring
8de4ffb294
tpl/tplimpl: Fix context in shortcode error messages
...
Fixes #13279
2025-01-20 16:17:55 +01:00
Nicolas Friedli
8897113666
tpl: Add loading attribute to qr shortcode
2025-01-17 19:06:54 +01:00
Joe Mooring
1191467c05
tpl/tplimpl: Deprecate twitter shortcode in favor of x shortcode
...
Closes #13214
2025-01-16 10:33:34 +01:00
Joe Mooring
8af04745fb
tpl/tplimpl: Use plain text for image render hook alt attribute
...
Co-authored-by: Heracles <email@heracl.es >
2025-01-10 19:44:39 +02:00
Joe Mooring
b13d0a68e6
tpl/images: Change signature of images.QR to images.QR TEXT OPTIONS
...
Closes #13230
2025-01-08 19:59:39 +01:00
Bjørn Erik Pedersen
0918e087ec
resources: Replace error handling in GetRemote with try (note)
...
Closes #13216
2025-01-06 12:22:17 +01:00
Joe Mooring
4ea94c451d
tpl/images: Add images.QR function
...
Closes #13205
2025-01-06 12:05:59 +01:00
Joe Mooring
a32c889a7b
tpl/tplimpl: Fix title attribute in details shortcode
2024-12-13 10:50:17 -08:00
Joe Mooring
852d868549
tpl/tplimpl: Update youtube shortcode
...
Pass a map instead of a slice to the collections.Querify function.
2024-12-13 15:16:55 +01:00
Joe Mooring
1e34e5b26d
tpl/tplimpl: Update details shortcode
...
- Remove localization of default summary value
- Add title attribute
- Reformat to be consistent with other embedded templates
- Simplify and improve integration test
- Update documentation
2024-12-13 14:21:13 +01:00
racehd
4f130f6e4f
tpl/tplimpl: Add details shortcode
...
- Add new shortcode to render details HTML element.
- Implement integration tests to check: default state, custom summary, open state, attribute sanitization, allowed attributes, and localization of default summary text.
- Update docs to include details shortcode.
Closes # 13090
2024-12-13 09:24:20 +01:00
Bjørn Erik Pedersen
e293e7ca6d
Add js.Batch
...
Fixes #12626
Closes #7499
Closes #9978
Closes #12879
Closes #13113
Fixes #13116
2024-12-12 21:43:17 +01:00
Joe Mooring
54398f8d57
tpl/tplimpl: Escape Markdown attributes in render hooks and shortcodes
2024-12-09 17:58:57 +01:00
Joe Mooring
801035bb7a
tpl/tplimpl: Create an embedded comment shortcode
...
Closes #13010
2024-11-04 21:05:07 +01:00
Patrice Chalin
039845804f
tpl/tplimpl: Trim descriptions rather than just chomp
2024-10-12 22:41:42 +02:00
Joe Mooring
1158e63072
markup/goldmark: Change default cell alignment in table render hook
...
Change the default table cell alignment from "left" to an empty string.
Closes #12886
2024-09-30 08:44:14 +02:00
Bjørn Erik Pedersen
e07028cb90
tpl: Remove RSS deprecation site.Author check
...
The check itself creates a warning which I guess was not intended.
We could possibly make that work, but it has been deprecated since Hugo 0.98, so just remove the usage.
2024-09-19 13:39:40 +02:00
Bjørn Erik Pedersen
6d97ee711e
Make all renderhook Text methods return template.HTML
2024-08-31 21:05:58 +02:00
Bjørn Erik Pedersen
f738669a4d
Add Markdown render hooks for tables
...
Fixes #9316
Fixes #12811
2024-08-31 17:21:31 +02:00
Patrice Chalin
53a8de21b8
tpl: Trim whitespace from google_analytics.html
2024-08-29 21:32:46 +02:00
Joe Mooring
b893a09aa6
tpl/tplimpl: Resolve render hook destinations with leading ./
...
Closes #12514
2024-05-21 09:38:25 +02:00
Joe Mooring
74ab839ccb
tpl/tplimpl: Plainify title and description in twitter_cards.html
...
Closes #12433
Improves #10900
2024-05-14 14:45:04 +02:00
Joe Mooring
92290aa892
tpl/tplimpl: Plainify title and description in schema.html
...
Closes #12432
2024-05-14 14:18:49 +02:00
Joe Mooring
87ab7f7ffc
tpl/tplimpl: Improve locale value in opengraph.html
...
Closes #12480
2024-05-14 10:24:17 +02:00
Joe Mooring
6dfeb9f038
tpl/tplimpl: Retain query string and fragment in render-image.html
...
Closes #12468
2024-05-10 22:32:48 +02:00
Joe Mooring
fb51b698b3
tpl/tplimpl: Fix double-escaping in opengraph template
...
Closes #12418
2024-04-25 10:03:17 +02:00
Bjørn Erik Pedersen
15a4b9b337
tpl: Escape .Title in built-in image and link render hooks
...
Co-authored-by: Joe Mooring <joe@mooring.com >
2024-04-22 16:54:24 +02:00
Joe Mooring
10a8448eee
tpl/tplimpl: Improve embedded templates
...
- Do not call the YouTube oEmbed API
- Do not include the Hugo version in RSS feeds
Closes #12396
2024-04-22 15:57:37 +02:00
Bjørn Erik Pedersen
0c188fda24
tpl: Use erroridf for remote YouTube errors
...
So they can be silenced.
Fixes #12383
2024-04-18 10:02:36 +02:00
Bjørn Erik Pedersen
df11327ba9
Pass .RenderShortcodes' Page to render hooks as .PageInner
...
The main use case for this is to resolve links and resources (e.g. images) relative to the included `Page`.
A typical `include` would similar to this:
```handlebars
{{ with site.GetPage (.Get 0) }}
{{ .RenderShortcodes }}
{{ end }}
```
And when used in a Markdown file:
```markdown
{{% include "/posts/p1" %}}
```
Any render hook triggered while rendering `/posts/p1` will get `/posts/p1` when calling `.PageInner`.
Note that
* This is only relevant for shortcodes included with `{{%` that calls `.RenderShortcodes`.
* `.PageInner` is available in all render hooks that, before this commit, received `.Page`.
* `.PageInner` will fall back to the value of `.Page` if not relevant and will always have a value.
Fixes #12356
2024-04-15 09:49:57 +02:00
Joe Mooring
8a0ea12d8a
tpl/tplimpl: Improve youtube shortcode
...
Changes:
- Add query string params for controls, loop, mute, start, and end
- Add iframe loading attribute
- Obtain default iframe title from YouTube oEmbed API
- Fix autoplay feature
- Improve readability
Closes #3694
Closes #9213
Closes #10520
Closes #10575
Closes #10576
Co-authored-by: sgharms <sgharms@stevengharms.com >
2024-04-04 11:08:30 +02:00
Joe Mooring
2da4ec5738
tpl/tplimpl: Improve embedded opengraph template
...
Changes:
- Add tags per documentation
- Prefer site.Title over site.Params.title
- Plainify titles, tags, and descriptions
- Add fallback values for locale
- Fix pages related by series
- Improve readability
Closes #8296
Closes #8698
Closes #8991
Closes #9818
Closes #9866
Closes #10647
Co-authored-by: tomy0000000 <git@tomy.me >
Co-authored-by: sean-au <sean@powerfulwebdesign.com.au >
2024-04-02 18:35:43 +02:00
Joe Mooring
6738a3e79d
tpl/tplimpl: Optionally exclude content from sitemap
...
Define global inclusion/exclusion in site configuration, and override
via front matter. For example, to exclude a page from the sitemap:
[sitemap]
disable = true # default is false
Closes #653
Closes #12282
Co-authored-by: kolappannathan <kolappannathan@users.noreply.github.com >
Co-authored-by: felicianotech <FelicianoTech@gmail.com >
2024-04-02 11:21:03 +02:00
Joe Mooring
2f7df4b926
tpl/tplimpl: Remove trailing slash from void elements
...
Closes #11867
2024-04-01 08:07:02 -07:00
Joe Mooring
f0a26cf58e
tpl/tplimpl: Update RSS template
...
- Use publication date for pubdate
- Include version in generator element
Closes #3918
Closes #11692
2024-03-30 18:32:58 +01:00
Joe Mooring
74ce5dc841
tpl/tplimpl: Update schema template
...
Changes:
- Remove trailing comma from list of keywords.
- Improve keywords precedence:
1. Use "keywords" term page titles.
2. Use "keywords" from front matter if "keywords" is not a taxonomy.
3. Use "tags" term page titles.
4. Use term page titles from all taxonomies.
- Enable schema for all page kinds, previously limited to kind = page.
- Remove trailing slashes from void elements.
- Improve readability.
Closes #7570
Co-authored by: 0urobor0s <0urobor0s@users.noreply.github.com >
2024-03-28 14:56:02 +01:00