-
Notifications
You must be signed in to change notification settings - Fork 25.6k
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
base: master
Are you sure you want to change the base?
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Sorry for the confusion. Next time make sure you have read everything provided in the PR template. I added those checks because this repo is a victim of constant misdirected PRs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lsolesen These changes look like good extensions to the microformats support here.
I don't have a strong opinion on when author
is more appropriate than me
, but that distinction may be less relevant on single-author sites.
Curious though: would these changes still pass the Web Sign In test at https://indiewebify.me, which seems to expect rel="me"
and not rel="author"
?
Found one minor nit in the placement of the p-name
property.
{% 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> |
There was a problem hiding this comment.
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:
<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> |
@@ -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> |
There was a problem hiding this comment.
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.
@@ -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> |
There was a problem hiding this comment.
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.
This is a bug fix.
Summary
I think the current implementation of rel-me and rel-author is flawed.
rel-me is supposed to be used on profile pages relating to other profile pages - https://microformats.org/wiki/rel-me
Right now it is used on posts from the author-block, but here rel-author should be used instead - https://microformats.org/wiki/rel-author
I added the possibility from the authors.yml to add rel to the individual links, if you want to add another rel. This should cater for everybody. However, people might need to update this, if they want to keep it.
I also added the possibility to add rel from footer links, if people want that.
Context
Also I added h-entry, so Jekyll sites will be more compatible with Indieweb straight out of the box.