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
Joe Mooring
ebfca61ac4
tpl/tplimpl: Update Google Analytics template and config
...
Google Analytics 4 (GA4) replaced Google Universal Analytics (UA)
effective 1 July 2023.
See https://support.google.com/analytics/answer/11583528 .
Changes:
- Update tpl/tplimpl/embedded/templates/google_analytics.html
- Remove tpl/tplimpl/embedded/templates/google_analytics_async.html
- Remove extraneous config settings
Closes #11802
Closes #10093
2024-03-26 15:40:51 +01:00
Joe Mooring
d4d49e0f0e
hugolib: Deprecate site methods Author, Authors, and Social
...
Closes #12228
2024-03-15 17:26:45 +01:00
Joe Mooring
f038a51b3e
tpl/tplimpl: Remove deprecated method from sitemapindex.xml
2024-03-14 21:03:19 +01:00
Joe Mooring
48a0fea87a
tpl/tplimpl: Modify figure shortcode to look for page resource
...
Closes #12244
Closes #12245
2024-03-14 10:21:40 +02:00
Joe Mooring
632ad74fc5
tpl/tplimpl: Honor markdown attributes in embedded image render hook
...
Fixes #12203
2024-03-07 08:21:58 +01:00
Joe Mooring
c9f7ebf004
tpl/tplimpl: Resolve fragments in link render hook
...
Fixes #12084
2024-02-21 09:11:34 +01:00
Joe Mooring
d0788b96ae
tpl/tplimpl: Update embedded instagram, twitter, and vimeo shortcodes
...
- Replace data.GetJSON calls with resources.GetRemote
- Remove usage of Facebook’s oEmbed Read feature
Fixes #11971
2024-02-02 08:01:45 +01:00
Bjørn Erik Pedersen
5b7cb258ec
Create default link and image render hooks
...
Fixes #11933
2024-01-30 20:12:19 +01:00
Daniel Terhorst-North
87bf2b9688
tpl/tplimpl: Fix incorrect lastBuildDate
...
Fixes #11600
Co-authored-by: Joe Mooring <joe@mooring.com>
2024-01-25 19:46:52 +01:00
Daniel Terhorst-North
f281ef8a4a
tpl: fix incorrect lastBuildDate
...
Set the `<lastBuildDate>` field to be the most recent Lastmod date
of all the posts in the current selection.
Fixes #11600
2024-01-25 19:46:52 +01:00
Razon Yang
14d85ec136
tpl: Allow using page resources on the images page parameter for opengraph
, schema
and twitter_cards
templates
...
The page images selection order as follows:
1. Page's images parameter, image resources are supported.
2. Page's image resources that naming in *feature*, *cover* or *thumbnail* pattern.
3. If no page images specified, then the first one of site's images will be used as the fallback, supports site resources.
2023-12-04 12:05:41 +01:00