Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

"Check your homepage h-card" doesn't pick up u-photo unless it's nested directly under the h-card tag #6

Open
MaybeThisIsRu opened this issue Sep 4, 2020 · 1 comment

Comments

@MaybeThisIsRu
Copy link

IndieWeb IRC chat for reference.

I have my u-photo nested two or three divs under the h-card div. This causes Indiwebring to not pick up my photo.

When I added a hidden image directly underneath the h-card tag, Indiewebring was able to parse it.

The expectation is that no matter how far nested the u-photo or any property is, it should be parsed and picked up.You may see the current source HTML on my site.

This is a behaviour that is also mimicked by IndieWeb Webify and a similar issue has been filed.

@martymcguire
Copy link
Owner

martymcguire commented Sep 4, 2020

Thanks @hirusi !

Similar to issue #5, this is more an issue with the upstream microformat-node parsing library.

You can find the code that handles finding representative h-card here:

https://github.com/martymcguire/indiewebring.ws/blob/master/lib/representative-h-card.js

The TL;DR is that it uses the (somewhat outdated) microformat-node library to parse the page and return any h-cards found.

I'm a bit constrained by the results of microformat-node, but I'm open to suggestions and PRs!

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

No branches or pull requests

2 participants