diff --git a/controllers/Controller.php b/controllers/Controller.php index 864262e..1a0a227 100644 --- a/controllers/Controller.php +++ b/controllers/Controller.php @@ -68,6 +68,27 @@ class Controller { return $response; } + public function superfeedr(Request $request, Response $response) { + session_start(); + if(session('user_id')) { + $role = $this->_get_role($request, $response); + $site = ORM::for_table('sites')->where_id_is($role->site_id)->find_one(); + } else { + $role = false; + $site = false; + } + + $response->setContent(view('superfeedr', [ + 'title' => 'Telegraph Superfeedr Documentation', + 'user' => $this->_user(), + 'accounts' => $this->_accounts(), + 'site' => $site, + 'role' => $role, + 'return_to' => $request->getRequestURI() + ])); + return $response; + } + private static function _icon_for_status($status) { switch($status) { case 'success': diff --git a/public/assets/styles.css b/public/assets/styles.css index 8fb70bf..7913bc4 100644 --- a/public/assets/styles.css +++ b/public/assets/styles.css @@ -36,3 +36,10 @@ h2.site-name:hover .edit-site { max-width: 620px; word-wrap: break-word; } + +.tutorial-image { + max-width: 100%; + -webkit-box-shadow: 0px 0px 8px 0px rgba(0,0,0,0.5); + -moz-box-shadow: 0px 0px 8px 0px rgba(0,0,0,0.5); + box-shadow: 0px 0px 8px 0px rgba(0,0,0,0.5); +} \ No newline at end of file diff --git a/public/assets/superfeedr/create-new-website.png b/public/assets/superfeedr/create-new-website.png new file mode 100644 index 0000000..67a34c9 Binary files /dev/null and b/public/assets/superfeedr/create-new-website.png differ diff --git a/public/assets/superfeedr/new-site-form.png b/public/assets/superfeedr/new-site-form.png new file mode 100644 index 0000000..a8c98d8 Binary files /dev/null and b/public/assets/superfeedr/new-site-form.png differ diff --git a/public/assets/superfeedr/site-created.png b/public/assets/superfeedr/site-created.png new file mode 100644 index 0000000..22cd114 Binary files /dev/null and b/public/assets/superfeedr/site-created.png differ diff --git a/public/assets/superfeedr/site-settings.png b/public/assets/superfeedr/site-settings.png new file mode 100644 index 0000000..634db70 Binary files /dev/null and b/public/assets/superfeedr/site-settings.png differ diff --git a/public/assets/superfeedr/superfeedr-configuration.png b/public/assets/superfeedr/superfeedr-configuration.png new file mode 100644 index 0000000..d7f0464 Binary files /dev/null and b/public/assets/superfeedr/superfeedr-configuration.png differ diff --git a/public/assets/superfeedr/superfeedr-signup.png b/public/assets/superfeedr/superfeedr-signup.png new file mode 100644 index 0000000..ee3312f Binary files /dev/null and b/public/assets/superfeedr/superfeedr-signup.png differ diff --git a/public/assets/superfeedr/telegraph-dashboard-mentions.png b/public/assets/superfeedr/telegraph-dashboard-mentions.png new file mode 100644 index 0000000..7433edb Binary files /dev/null and b/public/assets/superfeedr/telegraph-dashboard-mentions.png differ diff --git a/public/index.php b/public/index.php index 1f26c39..d2b50d1 100644 --- a/public/index.php +++ b/public/index.php @@ -28,6 +28,8 @@ $router->addRoute('GET', '/site/new', 'Controller::new_site'); $router->addRoute('GET', '/site/edit', 'Controller::new_site'); $router->addRoute('POST', '/site/save', 'Controller::save_site'); $router->addRoute('GET', '/api', 'Controller::api'); +$router->addRoute('GET', '/superfeedr', 'Controller::superfeedr'); + $router->addRoute('GET', '/webmention/{code}/details', 'Controller::webmention_details'); $router->addRoute('GET', '/dashboard/send', 'Controller::dashboard_send'); $router->addRoute('POST', '/dashboard/get_outgoing_links.json', 'Controller::get_outgoing_links'); diff --git a/views/api.php b/views/api.php index 265affd..47a4410 100644 --- a/views/api.php +++ b/views/api.php @@ -8,7 +8,7 @@ $this->layout('layout-loggedin', ['title' => $title, 'accounts' => $accounts, 'u
diff --git a/views/new-site.php b/views/new-site.php
index c275d4c..7b2b1be 100644
--- a/views/new-site.php
+++ b/views/new-site.php
@@ -37,9 +37,14 @@
Create a Superfeedr tracker subscription and set this URL as the web hook URL.
+Create a Superfeedr tracker subscription and set this URL as the web hook URL.
If you are using Telegraph to send webmentions as well as receive webmentions from Superfeedr, it is recommended you create a separate site for Superfeedr so you can more easily separate the two uses of the service.
Your Superfeedr tracker subscription should have this topic URL.
+
+
+Enter "Mentions" for the name (or anything you want, but that's what I use), and enter your home page URL. Entering your URL here is how Telegraph knows which links in the Superfeedr feed to send webmentions for.
+
+
+
+After you create the site, click on the settings icon next to the name.
+
+
+
+Near the bottom, there is a Superfeedr Webhook URL. Copy that URL since we'll need it in the next step.
+
+
+
+
+
+Once you've signed up, you'll land on the Superfeedr dashboard. Click "Search and Track" to create a new tracker.
+
+Enter `link:aaronparecki.com` as the query term, obviously replacing the domain with your own, and set the format to "json". Paste your Telegraph URL from the setup process into the Callback/Webhook URL field. Then click "Subscribe"!
+
+
+
+At this point your tracker feed is live, and Superfeedr will begin sending web hooks to Telegraph whenever a new item is found that links to your website!
+
+Unfortunately nothing will happen right away, so you'll have to wait for someone to publish a blog post that links to you. Check back in a little while and you should see some webmentions show up on your Telegraph dashboard!
+
+
+
+Here you can see a few of the mentions I've received from my Superfeedr tracker, including one from Stack Overflow which doesn't yet send webmentions on its own!
+
+
+