Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions _layouts/docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,16 @@ <h2>Next steps</h2>
{{ content }}
<!-- tags -->
{% unless page.notags == true %}
{% assign keywords = page.keywords | split:"," %}
{% for keyword in keywords %}{% assign strippedKeyword = keyword | strip %}
{% capture keywordlist %}{{ keywordlist }}<a href="https://docs.docker.com/search/?q={{strippedKeyword}}">{{strippedKeyword}}</a>{% unless forloop.last %}, {% endunless %}{% endcapture %}
{% endfor %}
{% if keywordlist.size > 0 %}<span class="glyphicon glyphicon-tags" style="padding-right: 10px"></span><span style="vertical-align: 2px">{{ keywordlist }}</span>{% endif %}
{% assign keywords = page.keywords | split:"," -%}
{% if keywords.size > 0 -%}
<span class="glyphicon glyphicon-tags" style="padding-right: 10px"></span><span style="vertical-align: 2px">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noticing this here (not needed to change as part of this PR); we should get rid of these inline styles, and either add a CSS class or add a style for glyphicon / glyphicon-tags to our stylesheet to do the padding.

Also need to check why we're adding the extra <span> here, and if instead we could use the <a> itself to do this (haven't tried yet)

{%- for keyword in keywords -%}
{%- assign strippedKeyword = keyword | strip -%}
<a href="https://docs.docker.com/search/?q={{ strippedKeyword }}">{{ strippedKeyword }}</a>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also ok for a follow-up; we should remove the hard-coded https://docs.docker.com domain here. We're actually removing it again after generating the docs, so might as well just not add it in the first place 😂

{%- unless forloop.last %}, {% endunless -%}
{% endfor -%}
</span>
{% endif -%}
{% endunless %}
<!-- link corrections -->
<script language="JavaScript">
Expand Down