zola icon indicating copy to clipboard operation
zola copied to clipboard

Feature Request: Make it possible to re-use values from page.aliases for templating, e.g. for ID in ATOM feed

Open 1peter10 opened this issue 5 months ago • 2 comments

First: Thank you for Zola! I love it - despite maybe using it for a thing it might not have been intended for with https://linuxphoneapps.org!

To find a quick way for persistent feed IDs (see #2404 another issue regarding that) I figured that I could just re-use just a value from aliases to be able to change file names. As far as I can tell, this is not currently possible.

My failed implementation can be found at https://framagit.org/linuxphoneapps/linuxphoneapps.frama.io/-/commit/5240a539792d88c4573ff5669dee800e371113f5.

Please tell me, if this is possible and I have made an obvious error, or otherwise, please consider this as a feature to add! :-)

1peter10 avatar Mar 01 '24 19:03 1peter10

Using aliases for that seem like a hack? Do you need it for something other than an ID?

Keats avatar Mar 11 '24 10:03 Keats

Admittedly, it's a total hack. But for those that care enough to put aliases, it could solve the ID problem in ATOM feeds at the same time without much extra effort once their feed template contains the if statement.

The only alternative to solving this easily I see right now would be adding another value an extra (e.g., extra.feed_id) that then is included in the feed if it exists, but that would be less elegant and an additional step to remember each time. :slightly_smiling_face:

1peter10 avatar Mar 11 '24 19:03 1peter10