Reworked docs rendering using jinja2.
This commit is contained in:
parent
1e723e6647
commit
69e9c80ec3
12 changed files with 70 additions and 94 deletions
7
data/templates/xap/docs/docs.md.j2
Normal file
7
data/templates/xap/docs/docs.md.j2
Normal file
|
@ -0,0 +1,7 @@
|
|||
{%- for item in xap.documentation.order -%}
|
||||
{%- if not item[0:1] == '!' -%}
|
||||
{{ xap.documentation.get(item) }}
|
||||
{% else %}
|
||||
{%- include item[1:] %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
9
data/templates/xap/docs/response_flags.md.j2
Normal file
9
data/templates/xap/docs/response_flags.md.j2
Normal file
|
@ -0,0 +1,9 @@
|
|||
|{% for bitnum, bitinfo in xap.response_flags.bits | dictsort | reverse %} Bit {{ bitnum }} |{% endfor %}
|
||||
|{% for bitnum, bitinfo in xap.response_flags.bits | dictsort | reverse %} -- |{% endfor %}
|
||||
|{% for bitnum, bitinfo in xap.response_flags.bits | dictsort | reverse %} `{{ bitinfo.define }}` |{%- endfor %}
|
||||
|
||||
{% for bitnum, bitinfo in xap.response_flags.bits | dictsort | reverse %}
|
||||
{%- if bitinfo.define != "-" -%}
|
||||
* Bit {{ bitnum }} (`{{ bitinfo.define }}`): {{ bitinfo.description }}
|
||||
{% endif %}
|
||||
{%- endfor %}
|
5
data/templates/xap/docs/term_definitions.md.j2
Normal file
5
data/templates/xap/docs/term_definitions.md.j2
Normal file
|
@ -0,0 +1,5 @@
|
|||
| Name | Definition |
|
||||
| -- | -- |
|
||||
{%- for type, definition in xap.term_definitions | dictsort %}
|
||||
| _{{ type }}_ | {{ definition }} |
|
||||
{%- endfor %}
|
5
data/templates/xap/docs/type_docs.md.j2
Normal file
5
data/templates/xap/docs/type_docs.md.j2
Normal file
|
@ -0,0 +1,5 @@
|
|||
| Name | Definition |
|
||||
| -- | -- |
|
||||
{%- for type, definition in xap.type_docs | dictsort %}
|
||||
| _{{ type }}_ | {{ definition }} |
|
||||
{%- endfor %}
|
Loading…
Add table
Add a link
Reference in a new issue