minor updates to root HTML
[websub-hub] / src / template / root-html.js
index 97a1ad9c99c1b700a9b155935b83fc4c1ba8f0d3..8797564e54e93b1ef816de4c4e4b6e01269e3b7c 100644 (file)
@@ -46,6 +46,15 @@ function usageSection(isPublicHub, hubURL) {
               </code>
             </figure>
           </li>
+          <li>
+            Ideally, these should be combined in one header.
+            <figure>
+              <figcaption>Example:</figcaption>
+              <code>
+                Link: &lt;${hubURL}&gt;; rel="hub", &lt;https://example.com/feed/&gt;; rel="self"
+              </code>
+            </figure>
+          </li>
         </ul>
       </div>
       <div>
@@ -73,17 +82,23 @@ function usageSection(isPublicHub, hubURL) {
       </div>
       <div>
         <h3>Publishing Updates</h3>
-        Send a <code>POST</code> request to this hub with Form Data:
+        To notify the Hub that a topic&apos;s content has been updated and should be distributed to subscribers, send a <code>POST</code> request with Form Data (<code>application/x-www-form-urlencoded</code>):
         <ul>
           <li>
             <code>hub.mode</code> set to <code>publish</code>
           </li>
           <li>
-            <code>hub.url</code> set to the <code>self</code> link relation of the content
+            <code>hub.url</code> set to the <code>self</code> link relation of the content (this value may be set multiple times, to update more than one topic)
           </li>
         </ul>
+        <figure>
+          <figcaption>Example:</figcaption>
+          <code>
+            curl ${hubURL} -d'hub.mode=publish' -d'hub.url=https://example.com/blog_one/feed' -d'hub.url=https://example.com/blog_two/feed'
+          </code>
+        </figure>
       </div>`
-  : `
+    : `
       <h2>Private Hub</h2>
       <p>
         This hub only serves specific topics.
@@ -120,12 +135,15 @@ module.exports = (ctx, options) => {
   const pageTitle = options.manager.pageTitle;
   const isPublicHub = options.manager.publicHub;
   const contactHTML = options.adminContactHTML;
+  const footerEntries = options.manager.footerEntries;
   const hubURL = options.dingus.selfBaseUrl || '<s>https://hub.example.com/</s>';
   const headElements = [];
   const navLinks = [];
-  return th.htmlTemplate(1, pageTitle, headElements, navLinks, [
+  const mainContent = [
     aboutSection(),
     usageSection(isPublicHub, hubURL),
     contactSection(contactHTML),
-  ]);
+  ];
+  return th.htmlTemplate(1, pageTitle, headElements, navLinks, mainContent, footerEntries,
+  );
 };
\ No newline at end of file