Ancestors

Written by Steven Rosenberg on 2025-01-31 at 15:36

My Zola site now has atom.xml and rss.xml.

I copied the index.html from my theme into my main Zola directory's templates file, then made the changes that allowed the RSS feeds to build.

[#]zola #ssg #blogging

=> More informations about this toot | More toots from passthejoe@ruby.social

Written by Steven Rosenberg on 2025-01-31 at 15:37

Here are the changes in the index.html file I copied from the theme into my templates directory:

Before:

{% if config.generate_feed %}

<link rel="alternate" type="application/atom+xml" title="Feed" href="{{ get_url(path=config.feed_filename, trailing_slash=false) }}">

{% endif %}

After:

{% if config.generate_feeds %}

<link rel="alternate" type="application/atom+xml" title="Feed" href="{{ get_url(path='atom.xml') | safe }}"

/>

{% endif %}

=> More informations about this toot | More toots from passthejoe@ruby.social

Written by Steven Rosenberg on 2025-01-31 at 15:39

I will work on getting references to both atom.xml and rss.xml into index.html, but I'll have to figure out how to code an if statement that looks into an array.

But for now the RSS is flowing, and the site is building.

It's one of the nice features of Zola. If there's a template in your theme that you want to modify, you just move it from the theme's templates directory to your main Zola directory's templates directory. Then you can modify it without touching the theme.

=> More informations about this toot | More toots from passthejoe@ruby.social

Written by Steven Rosenberg on 2025-01-31 at 15:45

I copied /zola/themes/zola-hook/templates/index.html (and also page.html) into /zola/templates, and I'm editing the files in the latter.

And if I want to either refer to the original index.html and page.html — or copy them over again — I can.

Do any current Zola themes dynamically create index.html with RSS code based on the choices in config.toml? I think I can figure it out, just not today.

=> More informations about this toot | More toots from passthejoe@ruby.social

Written by Steven Rosenberg on 2025-01-31 at 15:49

I forgot to write that this is what I have in config.toml for RSS. It's standard, right out of the docs:

generate_feeds = true

feed_filenames = ["atom.xml", "rss.xml"]

feed_limit = 100

The Zola docs' Configuration section shows what it should look like if you choose one of the feed options but not both, so this post isn't a complete waste.

https://www.getzola.org/documentation/getting-started/configuration/

=> More informations about this toot | More toots from passthejoe@ruby.social

Toot

Written by Steven Rosenberg on 2025-02-01 at 19:35

I am closer to figuring out the Tera templates in Zola. This documentation will get me there https://keats.github.io/tera/docs/

=> More informations about this toot | More toots from passthejoe@ruby.social

Descendants

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113930306759362469
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
378.106756 milliseconds
Gemini-to-HTML Time
1.359568 milliseconds

This content has been proxied by September (3851b).