X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=src%2Ftemplate%2Froot-html.js;h=fc655c01200b2f94cacec37d82d7847d044ca108;hb=5618c8b62b18564ea4262cd089dcf54af72afc10;hp=c68d52a33313810d581029eb2fabf456429a4a54;hpb=9915fd047ecd95692e53d93ddb3ad25ae1680925;p=websub-hub diff --git a/src/template/root-html.js b/src/template/root-html.js index c68d52a..fc655c0 100644 --- a/src/template/root-html.js +++ b/src/template/root-html.js @@ -2,6 +2,18 @@ const th = require('./template-helper'); +function hAppSection(pageTitle) { + return ` `; +} + function aboutSection() { return `

What

@@ -46,6 +58,15 @@ function usageSection(isPublicHub, hubURL) { +
  • + Ideally, these should be combined in one header. +
    +
    Example:
    + + Link: <${hubURL}>; rel="hub", <https://example.com/feed/>; rel="self" + +
    +
  • @@ -73,15 +94,21 @@ function usageSection(isPublicHub, hubURL) {

    Publishing Updates

    - Send a POST request to this hub with Form Data: + To notify the Hub either of a new topic to syndicate, or that a topic's content has been updated and should be distributed to subscribers, send a POST request with Form Data (application/x-www-form-urlencoded): +
    +
    Example:
    + + curl ${hubURL} -d'hub.mode=publish' -d'hub.url=https://example.com/blog_one/feed' -d'hub.url=https://example.com/blog_two/feed' + +
    ` : `

    Private Hub

    @@ -123,12 +150,16 @@ module.exports = (ctx, options) => { const footerEntries = options.manager.footerEntries; const hubURL = options.dingus.selfBaseUrl || 'https://hub.example.com/'; const headElements = []; - const navLinks = []; + const navLinks = [{ + href: 'admin/', + text: 'Admin', + }]; const mainContent = [ aboutSection(), usageSection(isPublicHub, hubURL), contactSection(contactHTML), + hAppSection(pageTitle), ]; - return th.htmlTemplate(1, pageTitle, headElements, navLinks, mainContent, footerEntries, + return th.htmlTemplate(ctx, 0, pageTitle, headElements, navLinks, mainContent, footerEntries, ); }; \ No newline at end of file