-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generating feeds with files not ending in xml/html #2772
Comments
#2768 is related but a much more narrow use case |
For feeds I prefer to keep the control a bit tight around it. I think adding calendar support would be cool though |
oki, are you thinking about having it as a builtin then? If so I can work on improving the template for a PR if someone else with more zola experience worked on the code side that would be ace, otherwise I'll try properly develop my hacked solution after finalising the ics template |
my current working template is
DTSTAMP, I was quite unsure what to set this too I guess ideally it would be page.date, but I quite like having the page date the event date can be convinced thats a bad idea though. Variables I added were:
|
I think it would be fine to add but I don't know anything about .ics so I wouldn't really know what we need |
At the moment the above template validates against an online validator https://icalendar.org/validator.html?url=https://rustmanchester.co.uk/events/cal.ics The only new things that are needed are a start and end date, geo is optional and the other things are mostly the same as atom feed like description and title. |
Yeah the issue is how to handle the optional things that need to be put in the |
Would this all be simpler to add a config to extend templates that render e.g.
This way it's very explicit that the user is adding a template, unlike my original suggestion of implicitly adding templates if its in feeds making it a less noticeable side effect. For my config to work I would add cal.ics to
bonus points we could change this error |
Sorry I don't really get what you mean there with the additional_templates. |
A no worries will try explain better, By default zola/tera only runs templating on a subset of filename extensions (I'm not sure on the complete list).
Both #2768 and this issue, result in My new proposal was to add With the addition of
Documentation for this config would probably be along the lines of ...
todo get full list of template extensions Zola treats as valid |
Ah ok I see what you mean. It might be something needed indeed but there might be other options (like eg a feeds folder where we load everything in there etc) |
Supporting feeds with arbitrary extensions would also be useful for adding JSON Feed support (#311) |
Happy with any of the solutions suggested, as they all fit my use case :)
if we come to a decision I may get some time next month to work on it :) Speaking with almost no experience I think the |
Hmm maybe we should just fold the |
Bug Report
Environment
Zola version: zola 0.19.2
Expected Behavior
I can put any file extension in the templates folder and it be counted as a template, or failing that entering it as a
feed_filename
should convert it to a template for rendering feedsCurrent Behavior
Step to reproduce
feed_filenames = [ "atom.xml", "cal.ics"]
cal.ics
zola serve
will fail with the above errorOptionally clone and
zola serve
https://gitlab.com/rust-manchester/websiteAdditionally I forked zola to see if what I was attempting was possible and got a working version using
seam345@0cb8148
This was very hacked together though and only works for .ics extensions I imagine there are many more plain text formats that could be used to generate feeds in the same way
Did work though :D https://rustmanchester.co.uk/events/cal.ics
The text was updated successfully, but these errors were encountered: