Update author h-card on single posts#4
Merged
manton merged 2 commits intomicrodotblog:masterfrom Jun 16, 2020
Merged
Conversation
Contributor
Author
|
@manton Can you review this? |
Contributor
|
This is great, thank you! Will test it this week. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This moves some microformats2 classes so that the author h-card parses name, url, and photo. Also moves the
p-author h-cardinside theh-entryso it will parse the author property for the post.I tested this in-browser on a friend's site and with the php-mf2 parser. It parses correctly and does not appear to change the page visually even though the conversation.js and
post-metaare now moved inside the<article>element.Minimum HTML example:
Parsed:
{ "items": [ { "type": [ "h-entry" ], "properties": { "author": [ { "type": [ "h-card" ], "properties": { "name": [ "Todd Grotenhuis" ], "url": [ "https://blog.grotenhuis.info/" ], "photo": [ "https://micro.blog/toddgrotenhuis/avatar.jpg" ] }, "value": "Todd Grotenhuis" } ] } } ], "rels": {}, "rel-urls": {}, "debug": { "package": "https://packagist.org/packages/mf2/mf2", "source": "https://github.com/indieweb/php-mf2", "version": "0.4.6", "note": [ "This output was generated from the php-mf2 library available at https://github.com/indieweb/php-mf2", "Please file any issues with the parser at https://github.com/indieweb/php-mf2/issues", "Using the Masterminds HTML5 parser" ] } }