From e0e51608907d58c857d839cb6e19798f7a4d50ee Mon Sep 17 00:00:00 2001 From: Boris Mann Date: Sun, 14 Jan 2024 01:03:25 -0800 Subject: [PATCH] feeds --- _config.yml | 5 +++-- _notes/Boris Map.md | 3 +++ _notes/JSON Feed.md | 4 +++- journal-fedica.xml | 33 +++++++++++++++++++++++++++++++++ journal.json | 30 ++++++++++++++++++++++++++++++ journal.links.json | 31 +++++++++++++++++++++++++++++++ 6 files changed, 103 insertions(+), 3 deletions(-) create mode 100644 journal-fedica.xml create mode 100644 journal.json create mode 100644 journal.links.json diff --git a/_config.yml b/_config.yml index 5a9337d..b870e8d 100644 --- a/_config.yml +++ b/_config.yml @@ -1,12 +1,13 @@ title: "Boris Mann's Homepage" -name: Boris Mann +name: "Boris Mann's Homepage" user_description: "Open Source. Community. DWeb. Building edge computing at Fission with IPFS. Cooks & eats." -description: "Homepage and long term archive, with a side of tech blogs" +description: "Daily journals with links and asides, digital garden notes, and occasional long form blogs" notes_url: "https://notes.bmannconsulting.com" tags_url: "https://notes.bmannconsulting.com/#/page" profile_pic: /assets/bmann_hair_orange_256x256.png favicon: /assets/bmann_hair_orange_256x256.png copyright_name: Boris Mann +author: Boris Mann url: "https://bmannconsulting.com" baseurl: '' encoding: utf-8 diff --git a/_notes/Boris Map.md b/_notes/Boris Map.md index d0b85f8..858dc5f 100644 --- a/_notes/Boris Map.md +++ b/_notes/Boris Map.md @@ -1,3 +1,6 @@ +--- +--- + I made a map called "Boris Starred" using [[Facilmap]] and changed the read-only link to . It has a Starred layer, and a [[FoodWiki]] layer. diff --git a/_notes/JSON Feed.md b/_notes/JSON Feed.md index c98337e..2f06eab 100644 --- a/_notes/JSON Feed.md +++ b/_notes/JSON Feed.md @@ -16,4 +16,6 @@ The [spec is at version 1.1](https://www.jsonfeed.org/version/1.1/) as of August ## Jekyll JSON Feed Templates -https://github.com/georgemandis/jekyll-json-feeds \ No newline at end of file +https://github.com/georgemandis/jekyll-json-feeds + +These are Version 1.0 templates that need to be slightly updated. \ No newline at end of file diff --git a/journal-fedica.xml b/journal-fedica.xml new file mode 100644 index 0000000..d553b62 --- /dev/null +++ b/journal-fedica.xml @@ -0,0 +1,33 @@ +--- +--- + + + + {{ site.name | xml_escape }} - Journal Feed + {% if site.description %}{{ site.description | xml_escape }}{% endif %} + {{ site.url }} + + {{ site.time | date_to_rfc822 }} + {% assign sortedblog = site.journals | sort: 'date' | reverse %} + {% for post in sortedblog limit:50 %} + + {% if site.name %} + {{ site.name | xml_escape }} + {% endif %} + {{ post.content | strip_html | xml_escape | truncate:250 }}{% comment %} Fedica reads from title {% endcomment %} + {{ post.content | xml_escape | replace: 'src="/', 'src="https://bmannconsulting.com/' | replace: 'href="/', 'href="https://bmannconsulting.com/' }} + {% if post.link %} + {{ post.link }} + {% else %} + {{ site.url }}{{ post.url }} + {% endif %} + {{ post.date | date_to_rfc822 }} + https://bmannconsulting.com{{ post.url }} + + {% endfor %} + + \ No newline at end of file diff --git a/journal.json b/journal.json new file mode 100644 index 0000000..605c89c --- /dev/null +++ b/journal.json @@ -0,0 +1,30 @@ +--- +--- +{ + "version": "https://jsonfeed.org/version/1", + "title": {{ site.title | jsonify }}, + "description": {% if site.description %}{{ site.description | jsonify }}{% endif %}, + "home_page_url": "{{ site.url }}", + "feed_url": "{{ site.url }}/feed.json", + "favicon": "{{ site.url}}/favicon.png", + {% if site.author %} + "author": { + "name": {{ site.author | jsonify }} + }, + {% endif %} + "items": [ + {% assign sortedjournal = site.journals | sort: 'date' | reverse %} + {% for post in sortedjournal limit:25 %} + { + "id": "{{ post.url | prepend: site.baseurl | prepend: site.url }}", + "url": "{{ post.url | prepend: site.baseurl | prepend: site.url }}", + {% if post.link %} + "external_url": "{{ post.link }}", + {% endif %} + {% comment %}"title": {{ post.title | jsonify }}, {% endcomment %} + "content_html": {{ post.content | jsonify }}, + "date_published": "{{ post.date | date_to_rfc822 }}" + }{% unless forloop.last %},{% endunless %} + {% endfor %} + ] +} \ No newline at end of file diff --git a/journal.links.json b/journal.links.json new file mode 100644 index 0000000..2846f81 --- /dev/null +++ b/journal.links.json @@ -0,0 +1,31 @@ +--- +--- +{ + "version": "https://jsonfeed.org/version/1", + "title": {{ site.title | jsonify }}, + "description": {% if site.description %}{{ site.description | jsonify }}{% endif %}, + "home_page_url": "{{ site.url }}", + "feed_url": "{{ site.url }}/feed.links.json", + "favicon": "{{ site.url}}/favicon.png", + {% if site.author %} + "author": { + "name": {{ site.author | jsonify }} + }, + {% endif %} + "items": [ + {% assign sortedjournal = site.journals | sort: 'date' | reverse %} + {% for post in sortedjournal limit:40 %} + {% if post.link %} + + { + "id": "{{ post.url | prepend: site.baseurl | prepend: site.url }}", + "url": "{{ post.url | prepend: site.baseurl | prepend: site.url }}", + "external_url": "{{ post.link }}", + {% comment %}"title": {{ post.title | jsonify }},{% endcomment %} + "content_html": {{ post.content | jsonify }}, + "date_published": "{{ post.date | date_to_rfc822 }}" + }{% unless forloop.last %},{% endunless %} + {% endif %} + {% endfor %} + ] +} \ No newline at end of file -- 2.51.2