Add partial decorators for better composability#692
Add partial decorators for better composability#692agriyakhetarpal wants to merge 13 commits intoscientific-python:mainfrom
Conversation
✅ Deploy Preview for scientific-python-hugo-theme ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
I like the direction this is taking 👍 |
|
Also, it's neat that Hugo finally added that feature! |
efe5001 to
3d75b62
Compare
|
|
Restarting CI to see why Netlify is stuck Edit: I'm just going to assume it is down, but will mark this as ready for review anyway. |
|
Needs Authors update |
|
The atom feed template uses |
|
We can switch to yelosan/hugo-feeds on Codeberg. It looks like it's a bit better maintained (but still not maintained well enough, though). See yelosan/hugo-feeds (GitHub mirror) too. Another one I found is https://github.com/hugo-fixit/hugo-atom-feed, which last worked with Hugo v0.146.7. Honestly, I'm tempted to drop it, but reading #489 and #497, I see that we did have a fork of this subtheme in the past. |
|
How about we submit a patch first and see if it gets accepted? |
|
(We can merge, using a fork of our own for now.) |

This PR introduces partial decorators, a new feature in Hugo released with v0.154.0: https://github.com/gohugoio/hugo/releases/tag/v0.154.0. This will not be a user-facing change. The documentation is at https://gohugo.io/functions/templates/inner/ and is currently a bit sparse, but still understandable. From the docs: I have bumped to Hugo
v0.154.5v0.157.0 with this PR.A partial decorator is a partial template called from any other template including shortcodes, render hooks, and other partials.
There are some more examples here: gohugoio/hugoDocs#3330.
I also tried to add something to deduplicate the grid of items and cards, but that turned out to be more complicated – the content inside needs access to outer variables such as
$cardand.body. I think we can go ahead with this, for now at least, since it's a net win for easy deduplication either way, and we can do this kind of work incrementally.