Wren To-Dos July 2016

March 12, 2017 Addition


Upcoming version of Beaker Browser will have option to render .md files, instead of .html files. In other words, the browser will look for index.md instead of index.html. Browser will style the Markdown files itself.

Wren stores the Markdown files alongside the HTML files, but under document root, I chose the .txt extension to represent the Markdown files.

Possible to-do: - change Wren code to create, read, and update .md files under document root, and create a script to convert all existing .txt files to have the .md extension.

beaker screenshot of styling a .md file





the micropub json that i would need:

Create (POST request):

  "type": ["h-entry"],
  "properties": {
    "content": ["hello world"]

micropub update (PUT request):

  "action": "update",
  "url": "https://aaronpk.example/post/100",
  "replace": {
    "content": ["hello moon"]

Of course, I would need my own additional JSON properties, such as determining if it's a Preview during a Create (POST) or an Update (PUT) request. If preview, then don't conduct the create and update on the actual files. Preview only asks the server to return formatted HTML.

Jan 13, 2017 update: - currently, i'm passing on implementing the micropub spec. i would like to simplify the json sent to and received from the wren api code, using ideas from micropub.

WebMentions Self-Hosted

In late 2016, I added WebMention support to Wren that did not rely on a 3rd party service.


Page that accepts these types of WebMentions:


WebMentions 3rd Party

Relying on:

Example page that accepts and displays WebMentions from the above 3rd party service:


I don't want the JavaScript for the third party webmention app to exist in a custom article template that I must mention in a post. I would prefer to add the JavaScript within a post, but something with my code or Markdown changes a part of the code to entities, breaking it.

31Aug2016 update : I commented out an encoding entities call in the Client modules CreatePost and UpdatePost. But I decided to continue to use the custom post or article template webmention when wanting replies. That template contains the webmention endpoint at the top. This is done.

09Sep2016 update : I uncommented the encoding entities line.

Left to do: add dt-published and dt-updated

<time class="dt-published" datetime="2016-10-03 01:41:53">Oct 02, 2016 at 09:41:53 pm</time>

<time class="dt-updated" datetime="2016-10-03 22:09:50">Oct 03, 2016 at 06:09:50 pm</time>

Left to do: add a text input box to permit a commenter to drop in a URL to the person's response.

example page:

  Have you written a response to this? Let me know the URL:
  <form action="https://webmention.herokuapp.com/api/webmention" method="post">
    <input name="source" type="url" placeholder="http://example.com/my-cool-post" />
    <input name="target" value="http://voxpelli.com/2013/12/webmentions-for-static-pages/" type="hidden">
    <input value="Send Webmention" type="submit">

MicroFormats2 DONE

done enough for now - sep 2016



Add microformat2 attributes to a few areas in templates, such as H1 title for the article page and p-author.

I can manually add h-card or h-entry info within a post if desired.


p-name for the title of a post??

p-summary for the first paragraph. optional.

e-content around the body post??

h-entry surrounds the entire post, including title.

    <time class="dt-published" datetime="2013-12-18T22:45:00+00:00" pubdate>
      <a class="u-url u-uid" href="/2013/12/webmentions-for-static-pages/">18 December 2013</a>
    <a class="p-author h-card" href="/"><img class="u-photo" src="/avatar.jpg" alt="" /> Pelle Wessman</a>

13sep2016 update : added: h-entry, e-content, p-name, p-author h-card, and u-url.

13sep2016 cont : the added microformats worked. in a webmention reply post here, i surrounded a paragraph with span tags with a class of p-summary.

Open Graph DONE

Add Open Graph attributes

<meta property="og:type" content="website" /> (or article, note, etc.)
<meta property="og:title" content="Firstname lastname" />
<meta property="og:description" content="Testing the code" />
<meta property="og:url" content="http://wren.soupmode.com" />
<meta property="og:site_name" content="Wren Static Blog Tool" />
<meta property="og:image" content="barney.jpg" />

update: sep 13, 2016: - i'm not going to add open graph info. it seems that most of the indieweb users don't do this.

update again: sep 13, 2016: - added the above open graph attributes.