summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Parecki <aaron@parecki.com>2017-01-19 20:19:00 -0800
committerAaron Parecki <aaron@parecki.com>2017-01-19 20:19:00 -0800
commit61a80c5a2c1cd3ee6fb53602e20d6c0c832c9138 (patch)
tree22b04a8e6de2048b496d4dacc998c1921074f1d9
parentd376dac11c8008c59dc29d6515543ac23f856a0e (diff)
add docs for bookmark posts
-rw-r--r--controllers/static.php1
-rw-r--r--public/images/bookmark-interface.pngbin0 -> 38287 bytes
-rw-r--r--views/docs/bookmark.php34
-rw-r--r--views/docs/creating-posts.php1
4 files changed, 36 insertions, 0 deletions
diff --git a/controllers/static.php b/controllers/static.php
index 6b64df7..e2006af 100644
--- a/controllers/static.php
+++ b/controllers/static.php
@@ -6,6 +6,7 @@ function doc_pages($page=null) {
'creating-posts' => 'Creating Posts',
'editor' => 'Rich Editor',
'note' => 'Note Interface',
+ 'bookmark' => 'Bookmark Interface',
'syndication' => 'Syndication',
'post-status' => 'Post Status',
];
diff --git a/public/images/bookmark-interface.png b/public/images/bookmark-interface.png
new file mode 100644
index 0000000..ae2fb3e
--- /dev/null
+++ b/public/images/bookmark-interface.png
Binary files differ
diff --git a/views/docs/bookmark.php b/views/docs/bookmark.php
new file mode 100644
index 0000000..7900dfe
--- /dev/null
+++ b/views/docs/bookmark.php
@@ -0,0 +1,34 @@
+<div class="narrow">
+ <?= partial('partials/header') ?>
+
+ <h2>Bookmark</h2>
+
+ <img src="/images/bookmark-interface.png" style="max-width: 300px; float: right;">
+
+ <p>The bookmark interface is for creating bookmark posts.</p>
+
+ <h3>Bookmarklet</h3>
+
+ <p>On the bookmark interface, you can drag a bookmarklet to your bookmarks toolbar. This will let you bookmark pages that you're viewing with a single click. You can select text in the page to include the selected text in the "content" of your bookmark post. The title of the page will be prefilled as the name of the bookmark post.</p>
+
+ <h3>Post Properties</h3>
+
+ <p>The following properties will be sent in the Micropub request. This request will be sent as a form-encoded request.</p>
+
+ <p>The access token is sent in the Authorization HTTP header:</p>
+ <pre>Authorization: Bearer XXXXXXXXX</pre>
+
+ <ul>
+ <li><code>h=entry</code> - This indicates that this is a request to create a new <a href="https://indieweb.org/h-entry">h-entry</a> post.</li>
+ <li><code>bookmark-of</code> - This is the URL that you are bookmarking.</li>
+ <li><code>name</code> - The name of the bookmark post, typically this is the same as the name of the page you are bookmarking. The Javascript bookmarklet will autofill this from the <code>&lt;title&gt;</code> tag of the page.</li>
+ <li><code>content</code> - The text of the bookmark post. You can use this to add your own commentary, or post a quote from the page you're bookmarking. The bookmarklet will autofill this if you have text selected on the page.</li>
+ <li><code>category[]</code> - This property will be repeated for each tag you've entered in the "tags" field.</li>
+ <li><code>mp-syndicate-to[]</code> - Each syndication destination selected will be sent in this property. The values will be the <code>uid</code> that your endpoint returns. See <a href="/docs/syndication">Syndication</a> for more details. (If you are using an older Micropub endpoint that expects <code>syndicate-to</code>, you can customize this property in the settings.)</li>
+ </ul>
+
+ <hr>
+
+ <p>Back to <a href="/docs/creating-posts">Creating Posts</a></p>
+
+</div>
diff --git a/views/docs/creating-posts.php b/views/docs/creating-posts.php
index ca19f48..e1775bd 100644
--- a/views/docs/creating-posts.php
+++ b/views/docs/creating-posts.php
@@ -9,6 +9,7 @@
<ul>
<li><a href="/docs/editor">Rich Editor</a></li>
<li><a href="/docs/note">Note</a></li>
+ <li><a href="/docs/bookmark">Bookmark</a></li>
<li>... more documentation soon!</li>
</ul>