Comments (1)
Hey @Ruxton ! Thanks for looking at the webring!
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:
- it uses the (somewhat outdated) microformat-node library to parse the page and return any
h-card
s found. - it checks for a card with both
url
anduid
that point to the url they entered for their homepage. if it finds one, it uses it. - it checks for a card with a
url
that is also marked asrel="me"
somewhere on the page- looks like i have a bug in this code! not sure if it's impacting your case, but it will result in taking the first card returned by
microformat-node
if there is any link on the page withrel="me"
pointing to the homepage url.
- looks like i have a bug in this code! not sure if it's impacting your case, but it will result in taking the first card returned by
- finally, if there is only one card, and it has
url
matching the homepage url, it takes that.
I'm a bit constrained by the results of microformat-node
, but I'm open to suggestions and PRs on improving this algorithm!
from indiewebring.ws.
Related Issues (8)
- "Check your homepage h-card" doesn't pick up u-photo unless it's nested directly under the h-card tag HOT 1
- Remove inactive profiles from the IndieWeb webring HOT 2
- Possible to customize emoji set? HOT 4
- Proxy images HOT 2
- Update IndieAuth to remove `response_type=id`
- Improve accessibility of the output code for the webring HOT 2
- The next & previous links just link to a random site on the ring HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from indiewebring.ws.