Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Commit

Permalink
feat: add slug to AEP page
Browse files Browse the repository at this point in the history
Since we're moving toward slugs as the canonical identifier
rather than aep numbers, making the more prominent on the
AEP page.

Also adding bold to the categories in the navigation to
help better distinguish category vs AEP.
  • Loading branch information
toumorokoshi committed Nov 16, 2023
1 parent cd24853 commit a694537
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion aep_site/support/templates/aep.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ AEP-{{ aep.id }}: {{ aep.title }}
{# Wikipedia-style info table. -#}
<table id="aep-summary">
<tr><th colspan="2">{{ aep.title }}</th></tr>
<tr><td>Slug</td><td>{{ aep.slug }}</td></tr>
<tr><td>Number</td><td>{{ aep.id }}</td></tr>
{% with permalink = site.base_url + aep.relative_uri -%}
<tr><td>Permalink</td><td><a href="{{ permalink }}">{{ permalink.lstrip('htps')[3:] }}</a></td></tr>
Expand Down Expand Up @@ -55,7 +56,7 @@ AEP-{{ aep.id }}: {{ aep.title }}
{% include 'includes/breadcrumb.html.j2' %}
{% endwith -%}
{% include 'includes/state_banners/' + aep.state + '.html.j2' ignore missing %}
<h4 class="aep-number">AEP-{{ aep.id }}</h4>
<h4 class="aep-number">{{ aep.slug }} (AEP-{{ aep.id }})</h4>
{{ aep.content.html }}
{% include 'includes/footer.html.j2' %}
</section>
Expand Down
2 changes: 1 addition & 1 deletion aep_site/support/templates/includes/nav.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{# Individual AEPs in this scope. -#}
<li class="nav-item nav-item-header">AEPs</li>
{% for cat in site.scopes[scope_code].categories.values() -%}
<li class="nav-item">{{ cat.title }}</li>
<li class="nav-item"><b>{{ cat.title }}</b></li>
{% for aep in cat.aeps.values() -%}
<li class="nav-item{% if path.split('/')[-1] == '{:d}'.format(aep.id) %} nav-item-active{% endif %}">
<a href="{{ site.relative_uri }}/{{ aep.id }}">
Expand Down

0 comments on commit a694537

Please sign in to comment.