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

Conversation

lsolesen
Copy link
Contributor

@lsolesen lsolesen commented Nov 11, 2024

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.

@github-actions github-actions bot added Type: Invalid Type: Spam Don't submit your own website content here! labels Nov 11, 2024

This comment was marked as outdated.

@github-actions github-actions bot closed this Nov 11, 2024
@github-actions github-actions bot locked as spam and limited conversation to collaborators Nov 11, 2024
@iBug iBug reopened this Nov 11, 2024
@iBug iBug removed Type: Spam Don't submit your own website content here! Type: Invalid labels Nov 11, 2024
Repository owner unlocked this conversation Nov 11, 2024
@iBug
Copy link
Collaborator

iBug commented Nov 11, 2024

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.

Copy link

@infotexture infotexture left a 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>

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>

@@ -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.

@@ -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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants