Been hacking away on a new IndieWeb project called Fortress! It’s meant to be a way to simplify sign-in support for IndieWeb-compatible services (think Monocle or http://indiebookclub.biz/). You can check it out at fortress.black.af. [Here’s my site’s scan](https://fortress.black.af/demo?url=https%3A%2F%2Fjacky.wtf%2F]. I expose a lot of info!
Today I added support to IndieNews for storing and displaying the timezone of submitted posts. Previously, all the dates were stored and displayed as UTC, which can be misleading such as when a post is submitted after 5pm in Pacific time since the post then has the date of the following day in UTC.
When you submit a post to IndieNews, you just have to make sure you include a timezone offset in your
dt-published property. If you format your published property with a full ISO8601 date such as "2017-02-01T08:40:00-0800" then it is already included.
As with all my projects, IndieNews internally stores the date as UTC, and stores the offset separately. This allows normal date sorting using the one value, and when I go to display the date, I include the offset which adjusts the date appropriately.
Following up on yesterday's update of adding a Webmention form on IndieNews' Webmention endpoint, today I finished building out the UI for submitting to IndieNews from a browser.
Now the "Submit" link includes a form where you can paste in your post's URL, in case your website doesn't send Webmentions automatically.
If you use this form to send the Webmention, then the response will be an HTML page instead of a JSON response. If the submission is successful, then it will actually return a 302 redirect to the IndieNews permalink of the post! This is a slight deviation from the Webmention spec, but it's fine because we don't really care if the browser is a spec-compliant Webmention client.
Also thanks to Chris Aldrich for the suggestion of using a dropdown for the target URL selection on the generic Webmention form.
This is the form you see when you visit the Webmention endpoint, which is not specific to the language you're on.
I realized today that if you visited the Webmention endpoint for IndieNews in a browser, it showed a 404 page, since the Webmention endpoint was only registered for POST requests. Today I added a page that is served for a GET request.
This follows the convention of showing human-readable instructions when a GET request is made to the Webmention endpoint, since GET requests have no meaning in the Webmention spec.
I also made it so that the JSON objects returned as part of the Webmention response are formatted nicely so that if you use the form you at least see something more readable than just unformatted JSON responses. This is helpful for example when there is an error response after submitting the Webmention.
You can now subscribe to realtime updates of IndieNews feeds via WebSub! (formerly known as PubSubHubbub)
It was relatively straightforward to add the necessary tags and ping the WebSub hub to make this work. I used Switchboard as the hub. I added the <link> tags and HTTP headers to indicate the hub and self URLs. When a new post is submitted, I then ping the hub, which is just an HTTP POST request with the URL of the feed.
I then went to test the publisher using websub.rocks. That part worked great, websub.rocks was able to subscribe to my feed, and I see it receiving the ping when a new post is added to IndieNews.
Then I went to try subscribing to IndieNews in Woodwind. Woodwind reported that it subscribed successfully, but it appears that it no longer shows me the WebSub statistics that it used to. I wanted to ensure it was able to subscribe to the realtime feed, so I then used websub.rocks to test Woodwind!
As it turns out, Woodwind failed to subscribe to the test feed in websub.rocks, but not because of a bug in Woodwind! It turns out I had a small bug in websub.rocks caused by a previous renaming of some things. It was a quick fix and I'm glad Woodwind was able to point that out!
After adding IndieNews to Woodwind, I then realized that these posts don't look quite right in readers, and we likely need to do some more brainstorming on how they should be marked up and consumed. The challenge is when displaying a bookmarked post, who should appear as the author, and where should the permalink go? To the bookmark or to the post being bookmarked? It's likely the case that you'd want to see both pieces of information, especially since you see both pieces of information on IndieNews.
Let's take a look at a post on IndieNews:
This is a post that Chris (boffosocko.com) bookmarked on his site, and submitted to IndieNews. His goal was to share the Wordpress plugin with the community, so that's the most prominent thing being displayed here. The "WordPress IndieNews" title links to the GitHub repository, and we see "github.com" below reflecting that. At the end of the line, we see "from boffosocko.com" which is a link to his bookmark post. This indicates to the viewer that this was submitted by someone else.
I am reasonably happy with the way this is presented on IndieNews. The question then is how should it appear when being viewed in a reader such as Woodwind? We clearly have more research to do in this area, so I've started by adding this screenshot and a short description to the Bookmark page on the wiki.
Today I started what is hopefully a series of updates to IndieNews. It's been a while since I've worked on it, probably because it's been mostly working fine which I guess is good.
The main thing I did today was replace its own Microformats parsing with delegating that to XRay. This should provide better results when parsing pages, since I've been concentrating my work in consuming Microformats posts in that project.
The visual update today is a change to how submitted stories are displayed. Previously, each story always showed the headline as a hyperlink to the post. For short titles, this worked fine. But sometimes someone would submit a plaintext note, or an article with a very long title. This looked pretty bad. Now, IndieNews will switch to rendering the post as a text note in a few cases. This means URLs in the note also get hyperlinked individually, which is a good improvement.
Newlines in the text are also preserved now.
As before, if a post with a title is submitted, then no content is displayed on the site. IndieNews is not meant to be a reader, it's just meant to link out to other content.
Another thing that went live during this release is the Dutch translation, thanks to @sebsel!
So feel free to submit all your Dutch stories here! https://news.indieweb.org/nl
Oh and one more thing. You should now be able to submit stories with emoji in the name! 😎