diff --git a/README.md b/README.md index 586b50c..b8fc4b7 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,9 @@ See the live demo (of the default configuration) here: https://pawroman.github.io/zola-theme-terminimal/ -Tested with Zola v0.17.2. Please note that earlier versions might not work because of breaking changes across Zola versions. +Tested with Zola v0.19.2. + +Please note that earlier (and older) versions might not work because of breaking changes across Zola versions. #### Fork disclaimer diff --git a/config.toml b/config.toml index cfcceca..b03451a 100644 --- a/config.toml +++ b/config.toml @@ -6,10 +6,10 @@ title = "Zola Terminimal theme" compile_sass = true # The theme supports feeds (RSS and ATOM) -generate_feed = true +generate_feeds = true # Use `rss.xml` for RSS feeds and `atom.xml` for ATOM. -feed_filename = "atom.xml" +feed_filenames = ["rss.xml", "atom.xml"] # Optional: enable tags taxonomies = [ diff --git a/templates/index.html b/templates/index.html index 8b67c98..fd07b4c 100644 --- a/templates/index.html +++ b/templates/index.html @@ -13,14 +13,18 @@ {%- block open_graph %}{{ head_macros::open_graph(config=config) }}{% endblock open_graph -%} - {%- if config.generate_feed %} - {%- if "rss" in config.feed_filename %} - {% set feed_type = 'rss+xml' %} - {%- else %} - {% set feed_type = 'atom+xml' %} - {% endif -%} - - {% endif -%} + {%- if config.generate_feeds %} + {%- for feed in config.feed_filenames %} + {%- if feed is containing('atom') %} + + {%- endif %} + + {%- if feed is containing('rss') %} + + {%- endif %} + + {%- endfor %} + {%- endif -%} {%- if config.extra.favicon %} diff --git a/templates/shortcodes/image.html b/templates/shortcodes/image.html index 7a2f044..a357b81 100644 --- a/templates/shortcodes/image.html +++ b/templates/shortcodes/image.html @@ -1,8 +1,10 @@ {% if src %} {# If the image's URL is internal to the site... #} {% if src is not starting_with("http") %} - {# ... then prepend the site's base URL to the image's URL. #} - {% set src = config.base_url ~ src %} + {# ... then convert the page's colocated_path attribute to a string so it can be concatenated... #} + {% set colocated_path = page.colocated_path | as_str %} + {# ... and use `resize_image` to get image's URL for colocated blog posts and non-colocated blog posts. #} + {% set image = resize_image(path=colocated_path ~ src, width=5000, height=5000, op="fit") %} {% endif %} {% endif %}