[go: up one dir, main page]

IndieNews

IndieNews is a community-curated list of articles relevant to the Indie Web.

How to Submit a Post to IndieNews

In order to submit a post, you do not need an IndieNews account. Instead, you can only submit posts from your own site by linking to the IndieNews site and sending a notification using the webmention protocol!

1. Write a post on your own site

Create a new post on your site, and mark it up with the Microformats markup for an h-entry.

If you are submitting your own post, that's all you have to do.

To submit someone else's post, you can post a bookmark on your site and submit that URL to IndieNews! Post an h-entry as normal, then include a u-bookmark-of property linking to the actual URL you want to submit.

2. Add a "u-syndication" or "u-category" link to IndieNews

Inside the h-entry, add a link to the IndieNews home page for your language with the class u-syndication or u-category. This usually looks something like the following:

<a href="https://news.indieweb.org/en" class="u-syndication">
  Also posted on IndieNews
</a>

<a href="https://news.indieweb.org/en" class="u-category">#indienews</a>

3. Send a Webmention

If your website sends Webmentions automatically, then you don't need to worry about this step. Otherwise, follow the instructions below to send a Webmention, or just use the Webmention form available at the IndieNews Webmention endpoint.

Example Request

Make a POST request to https://news.indieweb.org/en/webmention with two parameters, source and target, where target is https://news.indieweb.org/en and source is http://example.com/100 assuming you are submitting a page on your site with the url http://example.com/100.

Note that each language's home page has a unique Webmention endpoint, so you should do the Webmention endpoint discovery as normal to find it.

POST /webmention HTTP/1.1
Host: news.indieweb.org

target=https://news.indieweb.org/en
&source=http://aaronparecki.com/notes/2013/04/25/1/original-post-discovery

Example Response

HTTP/1.1 201 Created
Location: https://news.indieweb.org/en/aaronparecki.com/notes/2013/04/25/1/original-post-discovery

{
 "result": "success",
 "notices": [
 ],
 "data": {
   "title": "A demonstration of Original Post Discovery #indieweb",
   "author": "aaronparecki.com",
   "date": "2013-04-26T03:22:39+00:00"
 },
 "source": "http://aaronparecki.com/notes/2013/04/25/1/original-post-discovery",
 "url": "https://news.indieweb.org/en/aaronparecki.com/notes/2013/04/25/1/original-post-discovery"
}

You can find the permalink of your syndication by looking for the Location header in the response. You can then update your post with that URL so that your post always links to the IndieNews permalink instead of the IndieNews home page.

This webmention endpoint also returns more data that is useful for debugging purposes while you're initially trying it out.

  • result - Will be equal to "success" if the submission was accepted
  • notices - An array of string messages if there was anything that needs attention in your submission. These are not errors, but will indicate if microformat markup was not present or invalid.
  • data - This object shows the values extracted from the page, including title, author and date.
  • source - The source URL sent in the initial request
  • url - The permalink to this submission on news.indieweb.org.

Sample Code

Curl
curl https://news.indieweb.org/webmention -i \
  -d target=https://news.indieweb.org/en \
  -d source=http://aaronparecki.com/notes/2013/04/25/1/original-post-discovery
PHP
<?php
$ch = curl_init("https://news.indieweb.org/webmention");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, array(
  'target' => 'https://news.indieweb.org/en',
  'source' => 'http://aaronparecki.com/notes/2013/04/25/1/original-post-discovery'
));
echo curl_exec($ch);
?>
Ruby
require 'rest-client'
require 'json'

data = JSON.parse RestClient.post "https://news.indieweb.org/webmention", {
  'target' => 'https://news.indieweb.org/en',
  'source' => 'http://aaronparecki.com/notes/2013/04/25/1/original-post-discovery'
}
jj data

Re-Submitting a Post

If you update the post (for example trying to debug the microformats markup, or changing the post title), you can re-send the webmention. The existing IndieNews post will be updated with the new information found.

Microformats Support

Your page must be marked up with an h-entry or an h-event, IndieNews will use the name in the entry as the title of the submission.

If an h-card is present, author information will be pulled from there, otherwise it will fall back to using the domain name as the author.

Pingback Support

If you use a client which automatically sends pingbacks to any links found in the post, then you can use the same flow as the WebMention flow but send a Pingback instead! You can find the pingback endpoint using the normal pingback discovery mechanism.

Note that the rich debugging response will not be present in the pingback reply.