version deployed to https://go.microformats.io/ might be old
Hey Will.
https://go.microformats.io/ says the source for the site is this repository, so hopefully this is the right place to report this.
Consider the following output of Parse on a given input, using microformats v1.2.0:
data := microformats.Parse(strings.NewReader(`<div class="[ h-card ][ sidebar ]"><img class="u-photo" src="https://example.com/photo.jpg" alt="Example"></div>`), &url.URL{})
enc := json.NewEncoder(os.Stdout)
enc.SetIndent("", "\t")
enc.Encode(data)
// Output:
// {
// "items": [
// {
// "type": [
// "h-card"
// ],
// "properties": {
// "name": [
// "Example"
// ],
// "photo": [
// {
// "alt": "Example",
// "value": "https://example.com/photo.jpg"
// }
// ]
// }
// }
// ],
// "rels": {},
// "rel-urls": {}
// }
Note that the "photo" property is an array with a map that has value and alt.
Entering the same HTML snippet at https://go.microformats.io/ and pressing Parse produces:
{
"items": [
{
"type": [
"h-card"
],
"properties": {
"name": [
"Example"
],
"photo": [
"https://example.com/photo.jpg"
]
}
}
],
"rels": {},
"rel-urls": {}
}
Notably, the "photo" field is a array with a single string.
Is the problem that https://go.microformats.io/ running with an older version of microformats or something else?
(The context for this is at https://github.com/shurcooL/home/issues/45. CC @toby3d.)
Thanks.
I think the repo for go.microformats.io is still https://github.com/microformats/microformats-parser-website-go ? And it hasn't been updated in 6 years 😱
@aaronpk: If I bump the version there, do you have the ability to redeploy it? It seems like it's still hosted on Heroku, though I'm curious what we do now that the free plans have gone away. Maybe consider moving those to fly.io or something? Or maybe I could deploy a go.microformats.dev there, and we redirect at some point since we'd talked about possibly using that domain at some point.
Yes, it's hosted on Heroku, and we've been paying the $7/mo or whatever for it. I'm not familiar with fly.io but I'd be happy to move it to something else if someone can do the setup for it.
Okay, I have a "microformats" org setup on fly.io, and the Go app deployed to https://go.microformats.dev/. It's just a docker image, so the config can be seen in 11ef700f1ef2e1f359a986d6d2463da7243e60d2, including the GitHub action to auto-deploy from this repo (rather than there being a separate website repo).
If we like this setup, I'm happy to deploy the other language sites and send the relevant PRs. We can either use the microformats.io hostnames, use both, or redirect them. I'm happy to help facilitate that as well when I've got some free time.
Awesome! Looks great!
I don't understand where the web interface is coming from if it's all deployed from just this repo rather than the website repo. Can you explain how that works?
Ultimately I'd like to move all the sites to the .dev domain and redirect the .io sites. We should probably have this conversation on the microformats github org instead tho. I'll make an issue there to track this.