—private-below—
EXCEPT NOT REALLY! In this case, because this file is hardlinked to `README.md` inside a publicised git repository. You have been warned! diff --git a/_index.md b/_index.md index 6c02fce..be4cc2a 100644 --- a/_index.md +++ b/_index.md @@ -1 +1 @@ -_This content will go on the homepage._ +_Welcome! You're one of the lucky ones seeing a very early version of this site._ diff --git a/config.ori b/config.ori new file mode 100644 index 0000000..57ccb99 --- /dev/null +++ b/config.ori @@ -0,0 +1,3 @@ +(all) => { + siteurl: all? "http://localhost:5000" : "https://hansfast.net" +} diff --git a/ori-templates/base_html.ori b/ori-templates/base_html.ori index 252bc23..ee1a9dc 100644 --- a/ori-templates/base_html.ori +++ b/ori-templates/base_html.ori @@ -7,6 +7,8 @@private mode
':''} diff --git a/ori-templates/changelog-feed.ori b/ori-templates/changelog-feed.ori new file mode 100644 index 0000000..cd2ecfd --- /dev/null +++ b/ori-templates/changelog-feed.ori @@ -0,0 +1,19 @@ +// The posts in JSON Feed format +(description, outline, all) => { + version: "https://jsonfeed.org/version/1.1" + title: "Changelog — hansfast.net" + feed_url: `${config.ori(all)/siteurl}/changelog.json` + home_page_url: config.ori(all)/siteurl + user_comment: "You are looking at the raw feed data for this site's changelog. This data is meant to be consumed by a 'feed reader'. Look for your software's instructions on how to add this url." + description + + // Map the post data to JSON Feed items + items: Tree.values(Tree.map(outline, (value, key) => { + date_published: post.date + id: url + title: post.title + url: `${config.ori(all)/siteurl}/changelog#${Origami.slug(key)}` + content_text: value + content_html: Origami.mdHtml(value) + })) +} diff --git a/pipeline.ori b/pipeline.ori index c2d8fd6..d35ee6f 100644 --- a/pipeline.ori +++ b/pipeline.ori @@ -76,4 +76,19 @@ index.html: ori-templates/indexPage.ori(final, all) ...onlyLinkedFiles + + //feed ... + //uh, mdoutline doesn't seem to be doing what it says! Experiment time ... + //yeah, looks weird. The first heading is taken to be the root title. weird. + //workaround: add a dummy level-1 heading. + //Further: ugh. I need the mdOutline to get the changelog entries, but then I don't have ID info and stuff. + //I anyways don't have good IDs for the headings. grr. + changelogSrc: `# posts + +${pubfiles/ab_changelog_pub.ori.md/_body}` + changelogOutline: Origami.mdOutline(changelogSrc) + changelogItems: Tree.mask(changelogOutline/posts, {...Tree.constant(true), _text: false}) + changelogFeed: ori-templates/changelog-feed.ori(changelogOutline/posts/_text, changelogItems, all) + } + diff --git a/site.ori b/site.ori index 1cd6078..95c266f 100644 --- a/site.ori +++ b/site.ori @@ -3,4 +3,6 @@ index.html: src/index.html ...src/pagesInFolders ...src/onlyLinkedFiles + changelog.json: Tree.json(src/changelogFeed) + changelog.rss: Origami.rss(changelog.json) }