summaryrefslogtreecommitdiffstats
path: root/tpl
AgeCommit message (Collapse)Author
13 daysAdd hash.XxHashBjørn Erik Pedersen
Also move the non crypto hash funcs into this new package. This is much faster than e.g. MD5, especially for larger inputs: ``` BenchmarkXxHash/xxHash_43-10 9917955 112.2 ns/op 56 B/op 4 allocs/op BenchmarkXxHash/mdb5_43-10 6017239 204.1 ns/op 96 B/op 3 allocs/op BenchmarkXxHash/fnv32a_43-10 14407333 82.30 ns/op 16 B/op 1 allocs/op BenchmarkXxHash/xxHash_4300-10 2916892 409.7 ns/op 56 B/op 4 allocs/op BenchmarkXxHash/mdb5_4300-10 159748 7491 ns/op 4912 B/op 3 allocs/op BenchmarkXxHash/fnv32a_4300-10 218210 5510 ns/op 16 B/op 1 allocs/op ``` Fixes #12635
2024-06-25Add css.TailwindCSSBjørn Erik Pedersen
Closes #12618 Closes #12620
2024-06-25Clean up the css related template funcs package structureBjørn Erik Pedersen
Deprecate and move: * resources.ToCSS => css.SASS * resources.PostProcess => css.PostProcess * resources.Babel => js.Babel Updates #12618
2024-06-24tpl/debug: Fix reset of debug timers when running the serverBjørn Erik Pedersen
Fixes #12621
2024-06-23Implement deferBjørn Erik Pedersen
Closes #8086 Closes #12589
2024-06-22Fix Erroridf/Warnidf mixed case issueBjørn Erik Pedersen
Fixes #12617
2024-06-04Add a HTTP cache for remote resources.Bjørn Erik Pedersen
Fixes #12502 Closes #11891
2024-05-21tpl/tplimpl: Resolve render hook destinations with leading ./Joe Mooring
Closes #12514
2024-05-14tpl/tplimpl: Plainify title and description in twitter_cards.htmlJoe Mooring
Closes #12433 Improves #10900
2024-05-14tpl/tplimpl: Plainify title and description in schema.htmlJoe Mooring
Closes #12432
2024-05-14Create pages from _content.gotmplBjørn Erik Pedersen
Closes #12427 Closes #12485 Closes #6310 Closes #5074
2024-05-14tpl/tplimpl: Improve locale value in opengraph.htmlJoe Mooring
Closes #12480
2024-05-10tpl/tplimpl: Retain query string and fragment in render-image.htmlJoe Mooring
Closes #12468
2024-05-04Make the cache eviction logic for stale entities more robustBjørn Erik Pedersen
Fixes #12458
2024-04-25Fix rebuilds when running hugo -wBjørn Erik Pedersen
This was partly broken in Hugo 0.123.0. We have two internal config options that gets set from the CLI: * Running; a web server is running * Watching; either set via `hugo -w` or `hugo server --watch=false` Part of the change detection code wrongly used the `Running` as a flag when `Watching` would be the correct. Fixes #12296
2024-04-25tpl/tplimpl: Fix double-escaping in opengraph templateJoe Mooring
Closes #12418
2024-04-22tpl: Escape .Title in built-in image and link render hooksBjørn Erik Pedersen
Co-authored-by: Joe Mooring <joe@mooring.com>
2024-04-22tpl/tplimpl: Improve embedded templatesJoe Mooring
- Do not call the YouTube oEmbed API - Do not include the Hugo version in RSS feeds Closes #12396
2024-04-18tpl: Use erroridf for remote YouTube errorsBjørn Erik Pedersen
So they can be silenced. Fixes #12383
2024-04-15Pass .RenderShortcodes' Page to render hooks as .PageInnerBjørn Erik Pedersen
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-14helpers: Fix TrimShortHTML when used with AsciiDoc contentJoe Mooring
Fixes #12369
2024-04-11all: Fix duplicate words in commentsEitan Adler
2024-04-04tpl/strings: Improve type checkingJoe Mooring
2024-04-04tpl/tplimpl: Improve youtube shortcodeJoe Mooring
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-04errors: Return error from cast.ToStringE() consistentlyseiya
2024-04-02tpl/tplimpl: Improve embedded opengraph templateJoe Mooring
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-02tpl/strings: Create strings.Diff template functionJoe Mooring
Closes #12330
2024-04-02tpl/tplimpl: Optionally exclude content from sitemapJoe Mooring
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-01tpl/tplimpl: Remove trailing slash from void elementsJoe Mooring
Closes #11867
2024-03-30tpl/tplimpl: Update RSS templateJoe Mooring
- Use publication date for pubdate - Include version in generator element Closes #3918 Closes #11692
2024-03-28tpl/tplimpl: Update schema templateJoe Mooring
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-26Fix panic with debug.Dump with Page when running the serverBjørn Erik Pedersen
This replaces the current implementation with `json.MarshalIndent` which doesn't produce the same output, but at least it doesn't crash. There's a bug in the upstream `litter` library. This can probably be fixed, but that needs to wait. I have tested `go-spew` which does not crash, but it is very data racy in this context. FIxes #12309
2024-03-26tpl/tplimpl: Update Google Analytics template and configJoe Mooring
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-15hugolib: Deprecate site methods Author, Authors, and SocialJoe Mooring
Closes #12228
2024-03-15Fix intersect and similar for term entry page collectionsBjørn Erik Pedersen
Fixes #12254
2024-03-15Upgrade to Go 1.22.1Bjørn Erik Pedersen
Closes #12250
2024-03-14tpl/tplimpl: Remove deprecated method from sitemapindex.xmlJoe Mooring
2024-03-14tpl/tplimpl: Modify figure shortcode to look for page resourceJoe Mooring
Closes #12244 Closes #12245
2024-03-13Fix Name for nested resourced fetched in resources.ByName and similarBjørn Erik Pedersen
Fixes #12214
2024-03-07Fix resource name in resources.ByTypeBjørn Erik Pedersen
Fixes #12190
2024-03-07Fix global resource isn't published when using an uncommon code constructBjørn Erik Pedersen
Fixes #12190
2024-03-07tpl/tplimpl: Honor markdown attributes in embedded image render hookJoe Mooring
Fixes #12203
2024-03-01Fix resources.GetMatch, resources.Match, and resources.ByType to they don't ↵Bjørn Erik Pedersen
normalize permalinks Fixes #12182
2024-02-21tpl/tplimpl: Resolve fragments in link render hookJoe Mooring
Fixes #12084
2024-02-19Handle rebuilds when resources passed to transform.Unmarshal etc. changesBjørn Erik Pedersen
Fixes #12065
2024-02-11all: Fix typosChristian Oliff
2024-02-02tpl/tplimpl: Update embedded instagram, twitter, and vimeo shortcodesJoe Mooring
- Replace data.GetJSON calls with resources.GetRemote - Remove usage of Facebook’s oEmbed Read feature Fixes #11971
2024-02-01tpl/data: Fix GetCSV deprecation messageJoe Mooring
2024-01-30Create default link and image render hooksBjørn Erik Pedersen
Fixes #11933
2024-01-30Add warnidf template functionBjørn Erik Pedersen
Also rename config `ignoreErrors` => `ignoreLogs` But the old still works. Closes #9189