mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-10 02:46:53 +00:00
Move glossary from HTML to markdown, add first-letter separators for TOC (#37644)
This commit is contained in:
parent
6c30bd8d16
commit
4f3099293a
@ -1,31 +0,0 @@
|
||||
---
|
||||
title: "Glossary"
|
||||
description: "Home Assistant's Glossary."
|
||||
---
|
||||
|
||||
{% assign entries = site.data.glossary | sort: 'term' %}
|
||||
|
||||
The glossary covers terms which are used around Home Assistant.
|
||||
|
||||
<div class="config-vars basic">
|
||||
|
||||
{% for entry in entries %}
|
||||
|
||||
<div class="config-vars-item">
|
||||
<div class="config-vars-label">
|
||||
<a name="{{ entry.term | slugify }}" class="title-link" href="#{{ entry.term | slugify }}"></a>
|
||||
<span class="config-vars-label-name">{{ entry.term }}</span>
|
||||
</div>
|
||||
<div class="config-vars-description-and-children">
|
||||
<span class="config-vars-description">
|
||||
{{ entry.definition | markdownify | newline_to_br }}
|
||||
{%- if entry.link -%}
|
||||
<a href="{{ entry.link }}">Read more about: {{ entry.term }}</a>
|
||||
{%- endif -%}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
33
source/_docs/glossary.markdown
Normal file
33
source/_docs/glossary.markdown
Normal file
@ -0,0 +1,33 @@
|
||||
---
|
||||
title: "Glossary"
|
||||
description: "Home Assistant's Glossary."
|
||||
---
|
||||
|
||||
The glossary covers terms which are used around Home Assistant.
|
||||
|
||||
{% assign entries = site.data.glossary | sort: 'term' %}
|
||||
{% assign current_letter = '' %}
|
||||
|
||||
{% for entry in entries %}
|
||||
|
||||
{% assign first_letter = entry.term | slice: 0 %}
|
||||
{% if first_letter != current_letter %}
|
||||
{% assign current_letter = first_letter | upcase %}
|
||||
|
||||
## {{ current_letter }}
|
||||
|
||||
---
|
||||
|
||||
{% endif %}
|
||||
|
||||
### {{ entry.term }}
|
||||
|
||||
{{ entry.definition | markdownify }}
|
||||
|
||||
{%- if entry.link -%}
|
||||
|
||||
{{ "[Read more about " | append: "_" | append: entry.term | append: "_](" | append: entry.link | append: ")" | markdownify }}
|
||||
|
||||
{%- endif -%}
|
||||
|
||||
{% endfor %}
|
Loading…
x
Reference in New Issue
Block a user