feat: tag authors of shared links on mastodon if possible

This commit is contained in:
Cory Dransfeldt 2024-07-04 15:11:43 -07:00
parent 8ea14491b9
commit 2d1cdc54f6
No known key found for this signature in database
7 changed files with 17 additions and 37 deletions

View file

@ -28,7 +28,7 @@ const fetchAllLinks = async () => {
while (fetchMore) {
const { data, error } = await supabase
.from('links')
.select('*, authors (name, url)')
.select('*, authors (name, url, mastodon)')
.order('date', { ascending: false })
.range(page * PAGE_SIZE, (page + 1) * PAGE_SIZE - 1)

View file

@ -1,18 +0,0 @@
{%- assign entries = data | normalizeEntries -%}
{
"version": "https://jsonfeed.org/version/1",
"title": "{{ title }}",
"icon": "https://cdn.coryd.dev/assets/avatar.png",
"home_page_url": "{{ meta.url }}",
"feed_url": "{{ permalink | absoluteUrl: meta.url }}",
"items": [{% for entry in entries limit: 20 -%}
{
"id": "{{ entry.url | btoa }}",
"title": "{{ entry.title | replaceQuotes }}",
"url": "{{ entry.url }}",
"content_text": "{{ entry.excerpt | replaceQuotes }}",
"date_published": "{{ entry.date | stringToRFC822Date }}"
}{% if not forloop.last %},{% endif %}
{%- endfor %}
]
}

View file

@ -1,12 +0,0 @@
---
layout: null
eleventyExcludeFromCollections: true
permalink: "/feeds/all.json"
---
{% render "partials/feeds/json.liquid"
permalink:"/feeds/all.json"
title:"Cory Dransfeldt: all activity"
data:collections.allContent
updated:collections.allContent[0].date
site:site
%}

View file

@ -20,8 +20,6 @@ description: These are awesome blogs that I enjoy and you may enjoy too.
<td class="blog-roll-icons">
{%- if blog.rss_feed -%}
<a href="{{ blog.rss_feed }}">{% tablericon "rss" "Subscribe via RSS" %}</a>
{%- else -%}
{%- endif -%}
{%- if blog.json_feed -%}
/ <a href="{{ blog.json_feed }}">{% tablericon "json" "Subscribe via JSON" %}</a>
@ -29,6 +27,9 @@ description: These are awesome blogs that I enjoy and you may enjoy too.
{%- if blog.newsletter -%}
/ <a href="{{ blog.newsletter }}">{% tablericon "mail-plus" "Newsletter subscription" %}</a>
{%- endif -%}
{%- if blog.mastodon -%}
/ <a href="{{ blog.mastodon }}">{% tablericon "brand-mastodon" "Mastodon" %}</a>
{%- endif -%}
</td>
</tr>
{% endfor %}