-
Notifications
You must be signed in to change notification settings - Fork 124
Configure footer as slim with edit link #172
Conversation
🤔 Not sure on the build error:
It doesn't seem this change should have had any impact. The footer was updated to use the slim configuration, but as best I can tell, the markup produced should be the same:
|
Still not sure why it would suddenly become a failure as of this pull request, but possible resolutions could include:
|
Dug up a recent-ish PR that fixed similar problem: #130 |
@ryanhofdotgov Ah! I guess a custom |
Here's the diff between the override and the base theme: 14c14
< <a href="{{ footer.top.href | default: '#' }}" data-proofer-ignore>{{ footer.top.text | default: 'Return to top' }}</a>
---
> <a href="{{ footer.top.href | default: '#' }}">{{ footer.top.text | default: 'Return to top' }}</a>
42c42
< {% if footer.logos or footer.heading or footer.contact %}
---
> {% if footer.logos or footer.heading or footer.contact or footer.edit_page %}
61a62,63
>
> {% if footer.contact %}
63,67c65,93
< <ul class="usa-unstyled-list">
< <li><a href="https://github.com/18F/uswds-jekyll">18F USWDS-Jekyll theme</a></li>
< <li>Hosted by <a href="https://federalist.18f.gov/">Federalist</a></li>
< <li>Maintained by <a href="https://18f.gsa.gov/">18F</a></li>
< </ul>
---
> {% assign social_links = site.data.footer.contact.social_links %}
> {% if footer.contact.contact_links %}
> {% for _link in social_links %}
> <a class="usa-link-{{ _link.type | default: 'generic' }}" href="{% if _link.external == true %}{{ _link.href }}{% else %}{{ _link.href | relative_url }}{% endif %}">
> <span>{{ _link.text }}</span>
> </a>
> {% endfor %}
> {% endif %}
> {% if footer.contact.heading %}
> <h3 class="usa-footer-contact-heading">{{ footer.contact.heading }}</h3>
> {% endif %}
> {% if footer.contact.contact_links %}
> <address>
> {% assign contact_links = site.data.footer.contact.contact_links %}
> {% for _link in contact_links %}
> <div class="usa-footer-primary-content usa-footer-contact_info">
> <p>
> <a href="{% if _link.external == true %}{{ _link.href }}{% else %}{{ _link.href | relative_url }}{% endif %}">
> {{ _link.text }}
> </a>
> </p>
> </div>
> {% endfor %}
> </address>
> {% endif %}
> {% endif %}
> {% if footer.edit_page %}
> {% include components/github-edit.html footer=footer path=page.path %}
> {% endif %} Some of it is explained by customizations (#130) and upstream updates (18F/uswds-jekyll@ce5ded4). It was originally added in 18F/frontend#208, but I can't tell what context there'd have been for overriding the base file. I think if the goal is to align to the TTS Handbook, it shouldn't be much a concern to lose these navigation links customizations. For the purpose of getting the build to pass, I could introduce an override file for the slim footer, with a similar fix as what was done in #130. I suspect the options in #172 (comment) would probably be more durable / maintainable. I'm leaning toward removing the "Return to top" link. |
Relevant for the errors previously flagged by |
Sounds reasonable to me – thanks! I think a lot of the little inconsistencies in this guide from years of divergence will get solved by just wholesale adopting most of the guide setup from one of the other repos and making that the reusable thing across most guides. Here's the most recent comprehensive discussion on that topic: |
Closes #167
This pull request seeks to add an "Edit this page" link to the footer of each page, modeled after the TTS Handbook.
Screenshots:
Reference:
As separate tasks, it may be worth considering: