Skip to content

Commit

Permalink
deploy: e99b5c7
Browse files Browse the repository at this point in the history
  • Loading branch information
netpyoung committed Dec 10, 2024
1 parent db2afec commit 7565c55
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
44 changes: 44 additions & 0 deletions docs/setup/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,50 @@ <h1 id="template">Template</h1>
<pre><code class="lang-liquid" name="Default">{%- if model.IsRenderTitle -%}
# {{ model.ProjectData }}
{%- endif -%}

{% for section in model.Sections -%}
{%- if section.DisplayName != empty %}

## {{ section.DisplayName }}
{%- endif -%}
{% if section.Categories == empty %}

No significant changes.
{% else %}
{% for category in section.Categories %}
### {{ category.DisplayName }}
{% if category.Contents.Count == 0 %}

No significant changes.
{% else %}
{%- for content in category.Contents -%}
{%- assign text = content.Text %}
{%- assign issues = content.Issues %}
- {{ text }}
{%- if issues != empty -%}
{%- if text contains '\n - ' or text contains '\n * ' %}

(
{%- else -%}
{%- if text != '' %} ({%- endif -%}
{%- endif -%}

{%- for issue in issues -%}
{{ issue | split: ': ' | first }}{% if forloop.last == false %}, {% endif %}
{%- endfor %}
{%- if text != empty %}){%- endif -%}
{% endif %}
{%- endfor %}
{%- assign categoryIssues = category.CategoryIssues -%}
{%- if categoryIssues.Count != 0 and categoryIssues[0] contains ']: ' %}
{% for issue in categoryIssues %}
{{ issue -}}
{% endfor %}
{%- endif %}
{% endif %}
{%- endfor -%}
{%- endif -%}
{% endfor %}
</code></pre></section>
</div>

Expand Down
2 changes: 1 addition & 1 deletion index.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
"docs/setup/template.html": {
"href": "docs/setup/template.html",
"title": "Template | NF.Tool.ReleaseNoteMaker",
"keywords": "Template support T4 template liquid Template.tt Template.liquid <#@ template debug=\"true\" hostspecific=\"true\" language=\"C#\" #> <#@ import namespace=\"System\" #> <#@ import namespace=\"System.Linq\" #> <#@ import namespace=\"System.Collections.Generic\" #> <# //System.Diagnostics.Debugger.Launch(); //System.Diagnostics.Debugger.Break(); TemplateModel model = Host.GetTemplateModel(); ReleaseNoteConfig config = Host.GetConfig(); #> <# if (model.IsRenderTitle) { WriteLine($\"# {model.ProjectData}\"); } #> <# foreach (Section section in model.Sections) { if (!string.IsNullOrEmpty(section.DisplayName)) { WriteLine($\"\\n## {section.DisplayName}\\n\"); } if (section.Categories.Count == 0) { WriteLine(\"No significant changes.\\n\"); continue; } foreach (Category category in section.Categories) { WriteLine($\"### {category.DisplayName}\\n\"); if (category.Contents.Count == 0) { WriteLine(\"No significant changes.\\n\"); continue; } foreach (Content content in category.Contents) { (string text, List<string> issues) = content; Write($\"- {text}\"); if (issues.Count == 0) { WriteLine(\"\"); continue; } if (text.Contains(\"\\n - \") || text.Contains(\"\\n * \")) { Write(\"\\n\\n (\"); } else { if (!string.IsNullOrEmpty(text)) { Write(\" (\"); } } for (int i = 0; i < issues.Count; i++) { string issue = issues[i]; Write(issue.Split(\": \", 2)[0]); if (i < issues.Count - 1) { Write(\", \"); } } if (!string.IsNullOrEmpty(text)) { Write(\")\"); } WriteLine(\"\"); } List<string> categoryIssues = category.GetAllIssues(); if (categoryIssues.Count > 0 && categoryIssues.First().Contains(\"]: \")) { WriteLine(\"\"); foreach (string issue in categoryIssues) { WriteLine(issue); } } WriteLine(\"\"); } } #> {%- if model.IsRenderTitle -%} # {{ model.ProjectData }} {%- endif -%} Hello WOrld"
"keywords": "Template support T4 template liquid Template.tt Template.liquid <#@ template debug=\"true\" hostspecific=\"true\" language=\"C#\" #> <#@ import namespace=\"System\" #> <#@ import namespace=\"System.Linq\" #> <#@ import namespace=\"System.Collections.Generic\" #> <# //System.Diagnostics.Debugger.Launch(); //System.Diagnostics.Debugger.Break(); TemplateModel model = Host.GetTemplateModel(); ReleaseNoteConfig config = Host.GetConfig(); #> <# if (model.IsRenderTitle) { WriteLine($\"# {model.ProjectData}\"); } #> <# foreach (Section section in model.Sections) { if (!string.IsNullOrEmpty(section.DisplayName)) { WriteLine($\"\\n## {section.DisplayName}\\n\"); } if (section.Categories.Count == 0) { WriteLine(\"No significant changes.\\n\"); continue; } foreach (Category category in section.Categories) { WriteLine($\"### {category.DisplayName}\\n\"); if (category.Contents.Count == 0) { WriteLine(\"No significant changes.\\n\"); continue; } foreach (Content content in category.Contents) { (string text, List<string> issues) = content; Write($\"- {text}\"); if (issues.Count == 0) { WriteLine(\"\"); continue; } if (text.Contains(\"\\n - \") || text.Contains(\"\\n * \")) { Write(\"\\n\\n (\"); } else { if (!string.IsNullOrEmpty(text)) { Write(\" (\"); } } for (int i = 0; i < issues.Count; i++) { string issue = issues[i]; Write(issue.Split(\": \", 2)[0]); if (i < issues.Count - 1) { Write(\", \"); } } if (!string.IsNullOrEmpty(text)) { Write(\")\"); } WriteLine(\"\"); } List<string> categoryIssues = category.GetAllIssues(); if (categoryIssues.Count > 0 && categoryIssues.First().Contains(\"]: \")) { WriteLine(\"\"); foreach (string issue in categoryIssues) { WriteLine(issue); } } WriteLine(\"\"); } } #> {%- if model.IsRenderTitle -%} # {{ model.ProjectData }} {%- endif -%} {% for section in model.Sections -%} {%- if section.DisplayName != empty %} ## {{ section.DisplayName }} {%- endif -%} {% if section.Categories == empty %} No significant changes. {% else %} {% for category in section.Categories %} ### {{ category.DisplayName }} {% if category.Contents.Count == 0 %} No significant changes. {% else %} {%- for content in category.Contents -%} {%- assign text = content.Text %} {%- assign issues = content.Issues %} - {{ text }} {%- if issues != empty -%} {%- if text contains '\\n - ' or text contains '\\n * ' %} ( {%- else -%} {%- if text != '' %} ({%- endif -%} {%- endif -%} {%- for issue in issues -%} {{ issue | split: ': ' | first }}{% if forloop.last == false %}, {% endif %} {%- endfor %} {%- if text != empty %}){%- endif -%} {% endif %} {%- endfor %} {%- assign categoryIssues = category.CategoryIssues -%} {%- if categoryIssues.Count != 0 and categoryIssues[0] contains ']: ' %} {% for issue in categoryIssues %} {{ issue -}} {% endfor %} {%- endif %} {% endif %} {%- endfor -%} {%- endif -%} {% endfor %} Hello WOrld"
},
"docs/tutorial.html": {
"href": "docs/tutorial.html",
Expand Down

0 comments on commit 7565c55

Please sign in to comment.