|
1 | 1 | {%- comment -%}
|
2 | 2 | input parameter: "category" (component id)
|
| 3 | +{%- endcomment -%} |
3 | 4 |
|
4 |
| ----------------- find the last update for the passed in category (or take the latest entry){%- endcomment -%} |
| 5 | +{% comment %} find the last update for the specified category (or take the latest entry) {% endcomment %} |
5 | 6 | {%- if include.category -%}
|
6 | 7 | {%- assign id = 'https://docs.signpath.io/changelog/feeds/' | append: include.category | append: '.xml' -%}
|
7 | 8 | {%- for entry in site.data.changelog -%}
|
8 | 9 | {%- if entry.updates -%}
|
9 | 10 | {%- for update in entry.updates -%}
|
10 | 11 | {%- if update[0] == include.category -%}
|
11 |
| - {%- if updated -%} |
12 |
| - {%- else -%} |
| 12 | + {%- if updated != nil -%} |
13 | 13 | {%- assign updated = entry.date -%}
|
14 | 14 | {%- endif -%}
|
15 | 15 | {%- endif -%}
|
|
27 | 27 | <updated>{{ updated | date: '%F' }}</updated>
|
28 | 28 | <id>{{ id }}</id>
|
29 | 29 | {%- assign category = include.category -%}
|
30 |
| -{%- assign selected_component = site.data.changelog_components.components | where: "id", category | first -%} |
| 30 | +{%- assign selected_component = site.data.changelog_definitions.components | where: "id", category | first -%} |
31 | 31 | <title type="html">SignPath - {{ selected_component.label }} Changelog</title>
|
32 | 32 | <author>
|
33 | 33 | <name>SignPath GmbH</name>
|
|
37 | 37 | {%- if entry.updates -%}
|
38 | 38 | {%- for update in entry.updates -%}
|
39 | 39 | {%- assign componentid = update[0] -%}
|
40 |
| - {%- assign component = site.data.changelog_components.components | where: "id", componentid | first -%} |
| 40 | + {%- assign component = site.data.changelog_definitions.components | where: "id", componentid | first -%} |
41 | 41 | {%- assign release = update[1] -%}
|
42 |
| - {%- if include.category == nil or include.category == componentid -%} |
43 |
| - <entry> |
44 |
| - <id>tag:docs.signpath.io,{{ entry.date | date: '%F'}}:{{ componentid }}:{{ release.version }}</id> |
45 |
| - <title>SignPath {{ component.label }} {{ release.version }}</title> |
46 |
| - <updated>{{ entry.date | date: '%F' }}</updated> |
47 |
| - <published>{{ entry.date | date: '%F' }}</published> |
48 |
| - <link rel="alternate" href="https://docs.signpath.io/changelog#{{ entry.date | date: '%F' }}" /> |
49 |
| - <category term="release/{{ componentid }}" label="{{ component.label }}" /> |
50 |
| - <summary type="html">New Release: {{ category_label }} {{ release.version }}</summary> |
51 |
| - <content type="html"> |
52 |
| - <div> |
53 |
| - <h2>New Release: {{ category_label }} {{ release.version }}</h2> |
54 |
| - {%- for changes_per_type in release -%} |
55 |
| - {%- assign change_type = changes_per_type[0] -%} |
56 |
| - {%- assign changes = changes_per_type[1] -%} |
57 |
| - |
58 |
| - {%- if change_type != "version" -%} |
59 |
| - <h3> |
60 |
| - {%- case change_type -%} |
61 |
| - {%- when "breaking_changes" -%} Breaking Changes / Manual migration steps: |
62 |
| - {%- when "upgrade_information" -%} Upgrade Information: |
63 |
| - {%- when "new_features" -%} New Features: |
64 |
| - {%- when "improvements" -%} Improvements: |
65 |
| - {%- when "changes" -%} Changes: |
66 |
| - {%- when "bug_fixes" -%} Bug Fixes: |
67 |
| - {%- endcase -%} |
68 |
| - </h3> |
69 |
| - {%- if change_type == "upgrade_information" -%} |
70 |
| - {{ changes | markdownify | xml_escape }} |
71 |
| - {%- else -%} |
72 |
| - <ul> |
73 |
| - {%- for note in changes -%} |
74 |
| - <li> |
75 |
| - {{ note.text | markdownify | xml_escape }} |
76 |
| - {%- if note.saas_only -%} |
77 |
| - <span class='enterprise-only'>(SaaS only)</span> |
78 |
| - {%- endif -%} |
79 |
| - </li> |
80 |
| - {%- endfor -%} |
81 |
| - </ul> |
| 42 | + {% if include.category == nil or include.category == componentid %} |
| 43 | + <entry> |
| 44 | + <id>tag:docs.signpath.io,{{ entry.date | date: '%F'}}:{{ componentid }}:{{ release.version }}</id> |
| 45 | + <title>SignPath {{ component.label }} {{ release.version }}</title> |
| 46 | + <updated>{{ entry.date | date: '%F' }}</updated> |
| 47 | + <published>{{ entry.date | date: '%F' }}</published> |
| 48 | + <link rel="alternate" href="https://docs.signpath.io/changelog#{{ entry.date | date: '%F' }}" /> |
| 49 | + <category term="release/{{ componentid }}" label="{{ component.label }}" /> |
| 50 | + <summary type="html">New Release: {{ category_label }} {{ release.version }}</summary> |
| 51 | + <content type="html"> <![CDATA[ |
| 52 | + <div> |
| 53 | + <h2>New Release: {{ category_label }} {{ release.version }}</h2> |
| 54 | + {%- for changes_per_type in release -%} |
| 55 | + {%- assign change_type = changes_per_type[0] -%} |
| 56 | + {%- assign changes = changes_per_type[1] -%} |
| 57 | + {%- if change_type != "version" -%} |
| 58 | + {% assign type = site.data.changelog_definitions.change_types | where: "id", change_type | first %} |
| 59 | + <h3> {{ type.label }}: </h3> |
| 60 | + <ul> |
| 61 | + {%- for note in changes -%} |
| 62 | + <li> |
| 63 | + {{ note.text | markdownify }} |
| 64 | + {%- if note.saas_only -%} |
| 65 | + <span class='enterprise-only'>(SaaS only)</span> |
| 66 | + {% endif %} |
| 67 | + </li> |
| 68 | + {%- endfor -%} |
| 69 | + </ul> |
82 | 70 | {%- endif -%}
|
83 |
| - {%- endif -%} |
84 |
| - {%- endfor -%} |
85 |
| - </div> |
86 |
| - </content> |
87 |
| - </entry> |
| 71 | + {% endfor %} |
| 72 | + </div> ]]> |
| 73 | + </content> |
| 74 | + </entry> |
88 | 75 | {%- endif -%}
|
89 | 76 | {%- endfor -%}
|
90 | 77 | {%- endif -%}
|
|
0 commit comments