This is an automated email from the ASF dual-hosted git repository.

dashorst pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/wicket-site.git

commit 1ed2e1bc081a40b44fdf0dcf295a0901d2df7f12
Author: Martijn Dashorst <[email protected]>
AuthorDate: Sun Mar 30 19:13:06 2025 +0200

    Fix: template errors in plugin
---
 _layouts/news_archive.html        | 6 +++---
 _plugins/yearly_archive_plugin.rb | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/_layouts/news_archive.html b/_layouts/news_archive.html
index d8152d3c..6449e289 100644
--- a/_layouts/news_archive.html
+++ b/_layouts/news_archive.html
@@ -31,9 +31,9 @@ layout: base
                    {% assign y = year.first.first.date | date: "%Y" %}
                    <h2>{{ y }}</h2>
                    <ul>
-                   <li><a href="{{site.baseurl}}/news/{{year.first.first.date 
| date: "%Y"}}">All of {{y}}</a></li>
-                   {% for month in year %}
-                   <li><a href="{{site.baseurl}}/news/{{year.first.first.date 
| date: "%Y"}}/{{month.first.date | date: "%m"}}">{{ month.first.date | date: 
"%B" }}</a></li>
+                   <li><a href="{{site.baseurl}}/news/{{y}}">All of 
{{y}}</a></li>
+                   {% for month in year %}{% capture m %}{{ month.first.date | 
date: "%m" }}{% endcapture %}
+                   <li><a href="{{site.baseurl}}/news/{{y}}/{{m}}">{{ 
month.first.date | date: "%B" }}</a></li>
                    {% endfor %}
                    </ul>
                {% endfor %}
diff --git a/_plugins/yearly_archive_plugin.rb 
b/_plugins/yearly_archive_plugin.rb
index fdb8d6a8..0ec30ebd 100644
--- a/_plugins/yearly_archive_plugin.rb
+++ b/_plugins/yearly_archive_plugin.rb
@@ -68,11 +68,11 @@ module Jekyll
       self.basename = 'index'
       self.content = <<-EOS
       {% for year in site.years %}
-      {% assign y = {year.first.first.date | date: '%Y'} %}
+      {% assign y = year.first.first.date | date: '%Y' %}
       {% if y == '#{year}' %}
       <div class="l-first">
           {% for month in year %}
-              {% assign m = {month.first.date | date: '%m'} %}
+              {% assign m = month.first.date | date: '%m' %}
               <div  class="l-full">
                   <h1>All News for {{ month.first.date | date: "%B %Y" }}</h1>
                   <p>This section contains all news items published in <a 
href="{{site.baseurl}}/news/{{y}}/{{m}}">{{ month.first.date | date: "%B %Y" 
}}</a>.</p>

Reply via email to