Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change to Indieweb defaults for rel-me and rel-author #5030

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
8 changes: 4 additions & 4 deletions _includes/archive-single.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
<img src="{{ teaser | relative_url }}" alt="">
</div>
{% endif %}
<h2 class="archive__item-title no_toc" itemprop="headline">
<h2 class="archive__item-title no_toc p-name" itemprop="headline">
{% if post.link %}
<a href="{{ post.link }}">{{ title }}</a> <a href="{{ post.url | relative_url }}" rel="permalink"><i class="fas fa-link" aria-hidden="true" title="permalink"></i><span class="sr-only">Permalink</span></a>
<a class="u-url" href="{{ post.link }}">{{ title }}</a> <a href="{{ post.url | relative_url }}" rel="permalink"><i class="fas fa-link" aria-hidden="true" title="permalink"></i><span class="sr-only">Permalink</span></a>
{% else %}
<a href="{{ post.url | relative_url }}" rel="permalink">{{ title }}</a>
<a class="u-url" href="{{ post.url | relative_url }}" rel="permalink">{{ title }}</a>
{% endif %}
</h2>
{% include page__meta.html type=include.type %}
{% if post.excerpt %}<p class="archive__item-excerpt" itemprop="description">{{ post.excerpt | markdownify | strip_html | truncate: 160 }}</p>{% endif %}
{% if post.excerpt %}<p class="archive__item-excerpt p-summary" itemprop="description">{{ post.excerpt | markdownify | strip_html | truncate: 160 }}</p>{% endif %}
</article>
</div>
56 changes: 28 additions & 28 deletions _includes/author-profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

{% if author.avatar %}
<div class="author__avatar">
<a href="{{ author.home | default: '/' | absolute_url }}">
<a rel="author" href="{{ author.home | default: '/' | absolute_url }}">
<img src="{{ author.avatar | relative_url }}" alt="{{ author.name }}" itemprop="image" class="u-photo">
</a>
</div>
{% endif %}

<div class="author__content">
<h3 class="author__name p-name" itemprop="name">
<a class="u-url" rel="me" href="{{ author.home | default: '/' | absolute_url }}" itemprop="url">{{ author.name }}</a>
<a class="u-url" rel="author" href="{{ author.home | default: '/' | absolute_url }}" itemprop="url">{{ author.name }}</a>
</h3>
{% if author.bio %}
<div class="author__bio p-note" itemprop="description">
Expand All @@ -34,22 +34,22 @@ <h3 class="author__name p-name" itemprop="name">
{% if author.links %}
{% for link in author.links %}
{% if link.label and link.url %}
<li><a href="{{ link.url }}" rel="nofollow noopener noreferrer me"{% if link.url contains 'http' %} itemprop="sameAs"{% endif %}><i class="{{ link.icon | default: 'fas fa-link' }}" aria-hidden="true"></i><span class="label">{{ link.label }}</span></a></li>
<li><a href="{{ link.url }}" rel="nofollow noopener noreferrer{% if item.rel %} {{ item.rel }}{% endif %}"{% if link.url contains 'http' %} itemprop="sameAs"{% endif %}><i class="{{ link.icon | default: 'fas fa-link' }}" aria-hidden="true"></i><span class="label">{{ link.label }}</span></a></li>
{% endif %}
{% endfor %}
{% endif %}

{% if author.uri %}
<li>
<a href="{{ author.uri }}" itemprop="url" rel="me">
<a href="{{ author.uri }}" itemprop="url" rel="author">
<i class="fas fa-fw fa-link" aria-hidden="true"></i><span class="label">{{ site.data.ui-text[site.locale].website_label | default: "Website" }}</span>
</a>
</li>
{% endif %}

{% if author.email %}
<li>
<a href="mailto:{{ author.email }}" rel="me" class="u-email">
<a href="mailto:{{ author.email }}" rel="author" class="u-email">
<meta itemprop="email" content="{{ author.email }}" />
<i class="fas fa-fw fa-envelope-square" aria-hidden="true"></i><span class="label">{{ site.data.ui-text[site.locale].email_label | default: "Email" }}</span>
</a>
Expand All @@ -58,127 +58,127 @@ <h3 class="author__name p-name" itemprop="name">

{% if author.keybase %}
<li>
<a href="https://keybase.io/{{ author.keybase }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
<a href="https://keybase.io/{{ author.keybase }}" itemprop="sameAs" rel="nofollow noopener noreferrer author">
<i class="fab fa-fw fa-keybase" aria-hidden="true"></i><span class="label">Keybase</span>
</a>
</li>
{% endif %}

{% if author.twitter %}
<li>
<a href="https://twitter.com/{{ author.twitter }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
<a href="https://twitter.com/{{ author.twitter }}" itemprop="sameAs" rel="nofollow noopener noreferrer author">
<i class="fab fa-fw fa-twitter-square" aria-hidden="true"></i><span class="label">Twitter</span>
</a>
</li>
{% endif %}

{% if author.facebook %}
<li>
<a href="https://www.facebook.com/{{ author.facebook }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
<a href="https://www.facebook.com/{{ author.facebook }}" itemprop="sameAs" rel="nofollow noopener noreferrer author">
<i class="fab fa-fw fa-facebook-square" aria-hidden="true"></i><span class="label">Facebook</span>
</a>
</li>
{% endif %}

{% if author.linkedin %}
<li>
<a href="https://www.linkedin.com/in/{{ author.linkedin }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
<a href="https://www.linkedin.com/in/{{ author.linkedin }}" itemprop="sameAs" rel="nofollow noopener noreferrer author">
<i class="fab fa-fw fa-linkedin" aria-hidden="true"></i><span class="label">LinkedIn</span>
</a>
</li>
{% endif %}

{% if author.xing %}
<li>
<a href="https://www.xing.com/profile/{{ author.xing }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
<a href="https://www.xing.com/profile/{{ author.xing }}" itemprop="sameAs" rel="nofollow noopener noreferrer author">
<i class="fab fa-fw fa-xing-square" aria-hidden="true"></i><span class="label">XING</span>
</a>
</li>
{% endif %}

{% if author.instagram %}
<li>
<a href="https://instagram.com/{{ author.instagram }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
<a href="https://instagram.com/{{ author.instagram }}" itemprop="sameAs" rel="nofollow noopener noreferrer author">
<i class="fab fa-fw fa-instagram" aria-hidden="true"></i><span class="label">Instagram</span>
</a>
</li>
{% endif %}

{% if author.tumblr %}
<li>
<a href="https://{{ author.tumblr }}.tumblr.com" itemprop="sameAs" rel="nofollow noopener noreferrer me">
<a href="https://{{ author.tumblr }}.tumblr.com" itemprop="sameAs" rel="nofollow noopener noreferrer author">
<i class="fab fa-fw fa-tumblr-square" aria-hidden="true"></i><span class="label">Tumblr</span>
</a>
</li>
{% endif %}

{% if author.bitbucket %}
<li>
<a href="https://bitbucket.org/{{ author.bitbucket }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
<a href="https://bitbucket.org/{{ author.bitbucket }}" itemprop="sameAs" rel="nofollow noopener noreferrer author">
<i class="fab fa-fw fa-bitbucket" aria-hidden="true"></i><span class="label">Bitbucket</span>
</a>
</li>
{% endif %}

{% if author.github %}
<li>
<a href="https://github.com/{{ author.github }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
<a href="https://github.com/{{ author.github }}" itemprop="sameAs" rel="nofollow noopener noreferrer author">
<i class="fab fa-fw fa-github" aria-hidden="true"></i><span class="label">GitHub</span>
</a>
</li>
{% endif %}

{% if author.gitlab %}
<li>
<a href="https://gitlab.com/{{ author.gitlab }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
<a href="https://gitlab.com/{{ author.gitlab }}" itemprop="sameAs" rel="nofollow noopener noreferrer author">
<i class="fab fa-fw fa-gitlab" aria-hidden="true"></i><span class="label">GitLab</span>
</a>
</li>
{% endif %}

{% if author.stackoverflow %}
<li>
<a href="https://stackoverflow.com/users/{{ author.stackoverflow }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
<a href="https://stackoverflow.com/users/{{ author.stackoverflow }}" itemprop="sameAs" rel="nofollow noopener noreferrer author">
<i class="fab fa-fw fa-stack-overflow" aria-hidden="true"></i><span class="label">Stack Overflow</span>
</a>
</li>
{% endif %}

{% if author.lastfm %}
<li>
<a href="https://last.fm/user/{{ author.lastfm }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
<a href="https://last.fm/user/{{ author.lastfm }}" itemprop="sameAs" rel="nofollow noopener noreferrer author">
<i class="fab fa-fw fa-lastfm-square" aria-hidden="true"></i><span class="label">Last.fm</span>
</a>
</li>
{% endif %}

{% if author.dribbble %}
<li>
<a href="https://dribbble.com/{{ author.dribbble }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
<a href="https://dribbble.com/{{ author.dribbble }}" itemprop="sameAs" rel="nofollow noopener noreferrer author">
<i class="fab fa-fw fa-dribbble" aria-hidden="true"></i><span class="label">Dribbble</span>
</a>
</li>
{% endif %}

{% if author.pinterest %}
<li>
<a href="https://www.pinterest.com/{{ author.pinterest }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
<a href="https://www.pinterest.com/{{ author.pinterest }}" itemprop="sameAs" rel="nofollow noopener noreferrer author">
<i class="fab fa-fw fa-pinterest" aria-hidden="true"></i><span class="label">Pinterest</span>
</a>
</li>
{% endif %}

{% if author.foursquare %}
<li>
<a href="https://foursquare.com/{{ author.foursquare }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
<a href="https://foursquare.com/{{ author.foursquare }}" itemprop="sameAs" rel="nofollow noopener noreferrer author">
<i class="fab fa-fw fa-foursquare" aria-hidden="true"></i><span class="label">Foursquare</span>
</a>
</li>
{% endif %}

{% if author.steam %}
<li>
<a href="https://steamcommunity.com/id/{{ author.steam }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
<a href="https://steamcommunity.com/id/{{ author.steam }}" itemprop="sameAs" rel="nofollow noopener noreferrer author">
<i class="fab fa-fw fa-steam" aria-hidden="true"></i><span class="label">Steam</span>
</a>
</li>
Expand All @@ -187,13 +187,13 @@ <h3 class="author__name p-name" itemprop="name">
{% if author.youtube %}
{% if author.youtube contains "://" %}
<li>
<a href="{{ author.youtube }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
<a href="{{ author.youtube }}" itemprop="sameAs" rel="nofollow noopener noreferrer author">
<i class="fab fa-fw fa-youtube" aria-hidden="true"></i><span class="label">YouTube</span>
</a>
</li>
{% elsif author.youtube %}
<li>
<a href="https://www.youtube.com/user/{{ author.youtube }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
<a href="https://www.youtube.com/user/{{ author.youtube }}" itemprop="sameAs" rel="nofollow noopener noreferrer author">
<i class="fab fa-fw fa-youtube" aria-hidden="true"></i><span class="label">YouTube</span>
</a>
</li>
Expand All @@ -202,39 +202,39 @@ <h3 class="author__name p-name" itemprop="name">

{% if author.soundcloud %}
<li>
<a href="https://soundcloud.com/{{ author.soundcloud }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
<a href="https://soundcloud.com/{{ author.soundcloud }}" itemprop="sameAs" rel="nofollow noopener noreferrer author">
<i class="fab fa-fw fa-soundcloud" aria-hidden="true"></i><span class="label">SoundCloud</span>
</a>
</li>
{% endif %}

{% if author.weibo %}
<li>
<a href="https://www.weibo.com/{{ author.weibo }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
<a href="https://www.weibo.com/{{ author.weibo }}" itemprop="sameAs" rel="nofollow noopener noreferrer author">
<i class="fab fa-fw fa-weibo" aria-hidden="true"></i><span class="label">Weibo</span>
</a>
</li>
{% endif %}

{% if author.flickr %}
<li>
<a href="https://www.flickr.com/{{ author.flickr }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
<a href="https://www.flickr.com/{{ author.flickr }}" itemprop="sameAs" rel="nofollow noopener noreferrer author">
<i class="fab fa-fw fa-flickr" aria-hidden="true"></i><span class="label">Flickr</span>
</a>
</li>
{% endif %}

{% if author.codepen %}
<li>
<a href="https://codepen.io/{{ author.codepen }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
<a href="https://codepen.io/{{ author.codepen }}" itemprop="sameAs" rel="nofollow noopener noreferrer author">
<i class="fab fa-fw fa-codepen" aria-hidden="true"></i><span class="label">CodePen</span>
</a>
</li>
{% endif %}

{% if author.vine %}
<li>
<a href="https://vine.co/u/{{ author.vine }}" itemprop="sameAs" rel="nofollow noopener noreferrer me">
<a href="https://vine.co/u/{{ author.vine }}" itemprop="sameAs" rel="nofollow noopener noreferrer author">
<i class="fab fa-fw fa-vine" aria-hidden="true"></i><span class="label">{{ site.data.ui-text[site.locale].email_label | default: "Email" }}</span>
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion _includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{% if site.footer.links %}
{% for link in site.footer.links %}
{% if link.label and link.url %}
<li><a href="{{ link.url }}" rel="nofollow noopener noreferrer"><i class="{{ link.icon | default: 'fas fa-link' }}" aria-hidden="true"></i> {{ link.label }}</a></li>
<li><a href="{{ link.url }}" rel="nofollow noopener noreferrer{% if item.rel %} {{ item.rel }}{% endif %}"><i class="{{ link.icon | default: 'fas fa-link' }}" aria-hidden="true"></i> {{ link.label }}</a></li>

Choose a reason for hiding this comment

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

Might be worth explaining in the docs how this works, so people know what they need to do to extend the attribute values here.

{% endif %}
{% endfor %}
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion _includes/page__date.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% assign date_format = site.date_format | default: "%B %-d, %Y" %}
{% if page.last_modified_at %}
<p class="page__date"><strong><i class="fas fa-fw fa-calendar-alt" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].date_label | default: "Updated:" }}</strong> <time class="dt-published" datetime="{{ page.last_modified_at | date: "%Y-%m-%d" }}">{{ page.last_modified_at | date: date_format }}</time></p>
<p class="page__date"><strong><i class="fas fa-fw fa-calendar-alt" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].date_label | default: "Updated:" }}</strong> <time class="dt-updated" datetime="{{ page.last_modified_at | date: "%Y-%m-%d" }}">{{ page.last_modified_at | date: date_format }}</time></p>

Choose a reason for hiding this comment

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

Good catch. I recall stumbling over this inconsistency a while back and implemented a local workaround, but makes sense to fix this at the source.

{% elsif page.date %}
<p class="page__date"><strong><i class="fas fa-fw fa-calendar-alt" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].date_label | default: "Updated:" }}</strong> <time class="dt-published" datetime="{{ page.date | date_to_xmlschema }}">{{ page.date | date: date_format }}</time></p>
{% endif %}
4 changes: 2 additions & 2 deletions _layouts/archive-taxonomy.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
<div id="main" role="main">
{% include sidebar.html %}

<div class="archive">
<div class="archive h-feed">
{% unless page.header.overlay_color or page.header.overlay_image %}
<h1 id="page-title" class="page__title"{% if page.locale %} lang="{{ page.locale }}"{% endif %}>{{ page.title }}</h1>
<h1 id="page-title p-name" class="page__title"{% if page.locale %} lang="{{ page.locale }}"{% endif %}>{{ page.title }}</h1>

Choose a reason for hiding this comment

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

This probably belongs in the class attribute rather than the ID:

Suggested change
<h1 id="page-title p-name" class="page__title"{% if page.locale %} lang="{{ page.locale }}"{% endif %}>{{ page.title }}</h1>
<h1 id="page-title" class="page__title p-name"{% if page.locale %} lang="{{ page.locale }}"{% endif %}>{{ page.title }}</h1>

{% endunless %}
{% for post in page.posts %}
{% include archive-single.html %}
Expand Down
2 changes: 1 addition & 1 deletion _layouts/archive.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<div id="main" role="main">
{% include sidebar.html %}

<div class="archive">
<div class="archive h-feed">
{% unless page.header.overlay_color or page.header.overlay_image %}
<h1 id="page-title" class="page__title"{% if page.locale %} lang="{{ page.locale }}"{% endif %}>{{ page.title }}</h1>
{% endunless %}
Expand Down
6 changes: 3 additions & 3 deletions _layouts/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<div id="main" role="main">
{% include sidebar.html %}

<article class="page" itemscope itemtype="https://schema.org/CreativeWork"{% if page.locale %} lang="{{ page.locale }}"{% endif %}>
<article class="page h-entry" itemscope itemtype="https://schema.org/CreativeWork"{% if page.locale %} lang="{{ page.locale }}"{% endif %}>
{% if page.title %}<meta itemprop="headline" content="{{ page.title | replace: '|', '&#124;' | markdownify | strip_html | strip_newlines | escape_once }}">{% endif %}
{% if page.excerpt %}<meta itemprop="description" content="{{ page.excerpt | markdownify | strip_html | strip_newlines | escape_once }}">{% endif %}
{% if page.date %}<meta itemprop="datePublished" content="{{ page.date | date_to_xmlschema }}">{% endif %}
Expand All @@ -31,15 +31,15 @@
{% unless page.header.overlay_color or page.header.overlay_image %}
<header>
{% if page.title -%}
<h1 id="page-title" class="page__title" itemprop="headline">
<h1 id="page-title" class="page__title p-name" itemprop="headline">
<a href="{{ page.url | absolute_url }}" itemprop="url">{{ page.title | markdownify | remove: "<p>" | remove: "</p>" }}</a>
</h1>
{%- endif %}
{% include page__meta.html %}
</header>
{% endunless %}

<section class="page__content" itemprop="text">
<section class="page__content e-content" itemprop="text">
{% if page.toc %}
<aside class="sidebar__right {% if page.toc_sticky %}sticky{% endif %}">
<nav class="toc">
Expand Down
Loading