feat: blogroll! not working yet but hopefully will get it working today

This commit is contained in:
Kebo 2025-01-24 12:38:33 -06:00
parent d3f56052a0
commit 1ad588a9d7
4 changed files with 188 additions and 9 deletions

View file

@ -26,6 +26,8 @@ const {current} = Astro.props;
/
<a href="/me" class="text-subtitle hover:underline">me</a>
/
<a href="/cool" class="text-subtitle hover:underline">cool</a>
/
<a href='/feeds' class="text-subtitle hover:underline">rss</a>
</h2>
</div>

53
src/data/blogroll.json Normal file
View file

@ -0,0 +1,53 @@
{
"blogroll" : [
{
"author": "Xe Iaso",
"url": "https://xeiaso.net",
"rank": 0,
"socials": [
{
"site": "github",
"url": "https://github.com/Xe"
},
{
"site": "bsky",
"url": "https://bsky.app/profile/xeiaso.net"
},
{
"site": "patreon",
"url": "https://www.patreon.com/cadey"
}
],
"note": "A really smart and successful orca. Often talks about generative AI, serverless, k8s, and more.",
"draft": false
},
{
"author": "Cendyne",
"url": "https://cendyne.dev",
"rank": 0,
"socials": [
{
"site": "fedi",
"url": "https://furry.engineer/@cendyne"
}
],
"note": "A naga that I am currently working with for FurSquared's web infrastructure. They've been amazingly helpful in learning the ropes of working in an actual production codebase and full-stack web development in general."
},
{
"author": "Sominemo",
"url": "https://sominemo.com",
"rank": 0,
"socials": [
{
"site": "github",
"url": "https://github.com/Sominemo"
},
{
"site": "telegram",
"url": "https://t.me/sominemo"
}
],
"note": "For a very cute throwback, check out the old-web version of the site at http://legacy.sominemo.com"
}
]
}

View file

@ -1,13 +1,30 @@
export type SocialEntry = {
site: string, // email, bsky, fedi, other
url: string, // url of social page
icon?: string, // custom icon to use for the social link widget
alt?: string // custom name of site to put on the social link widget
}
export type ShareFeedEntry = {
url: string,
author?: string,
email?: string,
baseUrl?: string,
date: string,
pubDate?: string,
title: string,
note: string,
draft?: boolean
url: string, // url of article
author?: string, // author of article
socials?: [SocialEntry], // social links for author
originalUrl?: string, // if `url` is an archive link, put original URL here
date: string, // date in which the entry was **added to the sharefeed**
pubDate?: string, // date in which the entry was **published online**
title: string, // title of the article
note: string, // editorial note to attach to the article
draft?: boolean // hide this entry from the main list
}
export type BlogRollEntry = {
author: string, // name of the author
url: string, // url of the website
rank: number, // 0 = friends, 1 = following, 2 = strangers
siteName?: string, // name of the website itself
socials?: [SocialEntry], // social links for the author
note?: string, // editorial note to attach to this entry
draft?: boolean // hide this entry from the main list
}
export const timeZone = "America/Chicago";

107
src/pages/cool.astro Normal file
View file

@ -0,0 +1,107 @@
---
import { compareDesc, format } from 'date-fns'
import { toZonedTime } from 'date-fns-tz'
import BaseLayout from '../layouts/BaseLayout.astro';
import HR from "../components/HR.astro";
import MDXCallout from '../components/mdx/MDXCallout.astro';
import brjson from "../data/blogroll.json";
import type { BlogRollEntry } from "../lib/utils";
import MDXAccordion from '../components/mdx/MDXAccordion.astro';
const entries = brjson.blogroll
.sort((a,b) => {
if (a.author < b.author) return -1;
if (a.author > b.author) return 1;
return 0;
})
.filter((entry) => !(entry.draft))
---
<BaseLayout title="cool">
<h1 class="font-serif text-3xl my-2">Cool Stuff</h2>
<p>If [/me](/me) was a page for everything I think is neat about myself, this page is a page for everything
I think is neat about the smallweb and indie tech enthusiast space at large.</p>
<HR/>
<h2 id="blogroll" class="font-serif text-2xl my-2">blogroll</h2>
<p class="mb-2">This is / hopefully will become a giant list of personal websites and blogs that I think are cool.</p>
<p class="mb-2">They are organized into three categories: <span class="text-purple-600 dark:text-purple-400">Damascus</span>,
for people that I am good friends with and enthusiastically recommend;
<span class="text-slate-600 dark:text-slate-400">Platinum</span>, for people that I do not personally know
but follow myself and think generally make good stuff; and
<span class="text-yellow-600 dark:text-yellow-400">Gold</span>, for people that I do not personally know
*nor* follow myself, but I saw at least one of their works and think they deserve a shout-out.</p>
<MDXAccordion title="disclaimer"><p class="mb-2">This ranking convention is *not* necessarily me saying "this person's stuff is better than this other person's
stuff"... It's more me saying "I am more confident that this person won't say something stupid than I am with
this other person". I have more confidence in people I personally know, and in people that I actively follow,
than some random person that popped up on the orange site that made something I think is neat. If it turns out
that random person later decides to make an article shilling a shitcoin or some unnecessary LLM madness, I'll
feel less bad about including them on here (and then *removing them* from here) if I made it clear from the
beginning that I don't guarantee that they *won't*. Thus: this silly ranking scheme.</p></MDXAccordion>
<p class="mb-2">If you can figure out what this ranking convention is based on, send me an email and the first person to do so
will get a $19 Fortnite card.</p>
<HR/>
<h3 class="font-serif text-xl my-2 text-purple-600 dark:text-purple-400">Damascus</h3>
<ul class="space-y-2">
{entries.filter((entry) => entry.rank === 0).map((entry: BlogRollEntry) => (
<li class="mb-2">
<a href={entry.url} class="font-serif text-lg text-crusta-400 dark:text-night-300 hover:underline">
{entry.author}
{entry.siteName ? `: ${entry.siteName}` : ''}
</a>
<p class="text-sm text-subtitle">
<span class="italic">&lt; {entry.url} &gt;</span><br/>
</p>
<p>{entry.note}</p>
</li>
))}
</ul>
<h3 class="font-serif text-xl my-2 text-slate-600 dark:text-slate-400">Platinum</h3>
<ul class="space-y-2">
{entries.filter((entry) => entry.rank === 1).map((entry: BlogRollEntry) => (
<li class="mb-2">
<a href={entry.url} class="font-serif text-lg text-crusta-400 dark:text-night-300 hover:underline">
{entry.author}
{entry.siteName ? `: ${entry.siteName}` : ''}
</a>
<p class="text-sm text-subtitle">
<span class="italic">&lt; {entry.url} &gt;</span><br/>
</p>
<p>{entry.note}</p>
</li>
))}
</ul>
<h3 class="font-serif text-xl my-2 text-yellow-600 dark:text-yellow-400">Gold</h3>
<ul class="space-y-2">
{entries.filter((entry) => entry.rank === 2).map((entry: BlogRollEntry) => (
<li class="mb-2">
<a href={entry.url} class="font-serif text-lg text-crusta-400 dark:text-night-300 hover:underline">
{entry.author}
{entry.siteName ? `: ${entry.siteName}` : ''}
</a>
<p class="text-sm text-subtitle">
<span class="italic">&lt; {entry.url} &gt;</span><br/>
</p>
<p>{entry.note}</p>
</li>
))}
</ul>
</BaseLayout>