File tree 1 file changed +8
-6
lines changed
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 18
18
{% for page in section.pages | reverse %}
19
19
<entry >
20
20
<title >{{ macros::escape_hbs(input=page.title) | safe }}</title >
21
- <link rel =" alternate" href =" https://blog.rust-lang.org{{ section.path | trim_end_matches(pat=" /" ) }}{{ macros::escape_hbs(input=page.path) | safe }}" type =" text/html" title =" {{ macros::escape_hbs(input=page.title) | safe }}" />
22
- {%- set year = page.components[0] | int %}
23
- {%- set month = page.components[1] | int %}
24
- {%- set day = page.components[2] | int %}
21
+ <link rel =" alternate" href =" https://blog.rust-lang.org{{ macros::escape_hbs(input=page.path) | safe }}" type =" text/html" title =" {{ macros::escape_hbs(input=page.title) | safe }}" />
22
+ {%- set num_comps = page.components | length %}
23
+ {%- set year = page.components | nth(n=num_comps - 4) %}
24
+ {%- set month = page.components | nth(n=num_comps - 3) %}
25
+ {%- set day = page.components | nth(n=num_comps - 2) %}
25
26
<published >{{ year }}-{{ month }}-{{ day }}T00:00:00+00:00</published >
26
27
<updated >{{ year }}-{{ month }}-{{ day }}T00:00:00+00:00</updated >
27
- <id >https://blog.rust-lang.org{{ section.path | trim_end_matches(pat="/") }}{{ macros::escape_hbs(input=page.path) | safe }}</id >
28
- <content type =" html" xml : base =" https://blog.rust-lang.org{{ section.path | trim_end_matches(pat= " / " ) }}{{ macros::escape_hbs(input=page.path) | safe }}" >{{ macros::escape_hbs(input=page.content) }}</content >
28
+ <id >https://blog.rust-lang.org{{ macros::escape_hbs(input=page.path) | safe }}</id >
29
+ <content type =" html" xml : base =" https://blog.rust-lang.org{{ macros::escape_hbs(input=page.path) | safe }}" >{{ macros::escape_hbs(input=page.content) }}</content >
29
30
30
31
<author >
31
32
<name >{{ macros::escape_hbs(input=page.authors | join(sep=", ")) }}</name >
32
33
</author >
33
34
</entry >
35
+ {%- if loop.index == 10 %}{% break %}{% endif %}
34
36
{%- endfor %}
35
37
</feed >
You can’t perform that action at this time.
0 commit comments