diff --git a/docs/source/_static/css/canada_theme.css b/docs/source/_static/css/canada_theme.css
index bb14fe9..d587596 100644
--- a/docs/source/_static/css/canada_theme.css
+++ b/docs/source/_static/css/canada_theme.css
@@ -249,6 +249,36 @@ ul.changes-list li span{
}
+ul.changes-list ul{
+
+ list-style: disc;
+ padding-left: 30px;
+ margin-top: 5px !important;
+ margin-bottom: 5px !important;
+
+}
+
+ul.changes-list ul li{
+
+ list-style: disc;
+
+}
+
+ul.changes-list ol{
+
+ list-style: decimal;
+ padding-left: 30px;
+ margin-top: 5px !important;
+ margin-bottom: 5px !important;
+
+}
+
+ul.changes-list ol li{
+
+ list-style: decimal;
+
+}
+
span.change-sub-note{
font-weight: 600;
@@ -268,6 +298,18 @@ span.change-backport{
}
+.change-canada-type-title{
+
+ position: relative;
+
+}
+
+.change-canada-type-icon::before{
+
+ color: rgba(0, 0, 0, 0.525);
+
+}
+
a.headerlink{
text-decoration: none !important;
diff --git a/docs/source/_templates/layout.html b/docs/source/_templates/layout.html
index c3e61a5..bad9924 100644
--- a/docs/source/_templates/layout.html
+++ b/docs/source/_templates/layout.html
@@ -97,7 +97,7 @@
This repository is only tracked from upstream.
{% elif info.change_logs %}
{% for type, changes in info.change_logs.items() %}
- {{ type }}
+ {{ type }}
{% for change in changes %}
-
diff --git a/docs/source/conf.py b/docs/source/conf.py
index 208b532..8ec114a 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -12,7 +12,8 @@
MARKDOWN_TAGS = set([
'del', 'dd', 'dl', 'dt', 'h1', 'h2',
'h3', 'img', 'kbd', 'p', 'pre', 's',
- 'sup', 'sub', 'strike', 'br', 'hr'
+ 'sup', 'sub', 'strike', 'br', 'hr',
+ 'ul', 'ol', 'li',
]).union(ALLOWED_TAGS)
MARKDOWN_ATTRIBUTES = copy.deepcopy(ALLOWED_ATTRIBUTES)
@@ -98,6 +99,15 @@ def escape(cls, s):
]
REMOVAL_LABEL = 'Removals'
+LABEL_MAP = [FEATURE_LABEL, FIX_LABEL, REMOVAL_LABEL, CHANGES_LABEL, MIGRATION_LABEL]
+LABEL_ICONS = {
+ FEATURE_LABEL: 'fa-code-fork',
+ FIX_LABEL: 'fa-wrench',
+ REMOVAL_LABEL: 'fa-trash',
+ CHANGES_LABEL: 'fa-code',
+ MIGRATION_LABEL: 'fa-database',
+}
+
# Configuration file for the Sphinx documentation builder.
#
@@ -440,7 +450,11 @@ def parsed_release_hashses():
for project_name, project_stack in changelog_dicts.items():
for repo, changelog_dict in project_stack.items():
if repo in parsed_release_hashses[release][project_name]:
- parsed_release_hashses[release][project_name][repo]['change_logs'] = changelog_dict
+ sorted_dict = {}
+ for _key in LABEL_MAP:
+ if _key in changelog_dict:
+ sorted_dict[_key] = changelog_dict[_key]
+ parsed_release_hashses[release][project_name][repo]['change_logs'] = sorted_dict
sorted_dict = dict(reversed(parsed_release_hashses.items()))
parsed_release_hashses = sorted_dict
@@ -481,8 +495,18 @@ def render_markdown(data):
If False all html tags are removed.
:type allow_html: bool
"""
+ #FIXME: sublists
if not data:
return ''
+ markdown_lists = [
+ '\n -',
+ '\n *',
+ '\n +',
+ '\n 1.',
+ ]
+ for match in markdown_lists:
+ if match in data:
+ data = data.replace(match, '\n%s' % match)
data = RE_MD_HTML_TAGS.sub('', data.strip())
data = bleach_clean(
markdown(data), strip=True,
@@ -494,6 +518,7 @@ def render_markdown(data):
html_context = {
'release_tags': release_tags,
'release_hashes': release_hashes,
+ 'type_icons': LABEL_ICONS,
'version_prefix': FRONTEND_VERSION_PREFIX,
'render_markdown': render_markdown,
}