feat: a changelog addition, and addition of subdomains to ?do=random
This commit is contained in:
parent
3b0bba0353
commit
f00eb24814
4 changed files with 9 additions and 7 deletions
|
|
@ -1,3 +1,4 @@
|
|||
2026-03-26 - inline section labels, compact layout
|
||||
2026-02-07 - related posts !
|
||||
2026-01-31 - text files now live at cleaner URLs (/*.txt instead of /txt/*.txt)
|
||||
2026-01-23 - hello. we've got the skeleton of something here
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
export const DEFAULT_CATEGORY = 'none';
|
||||
|
||||
export const SUBDOMAINS = [
|
||||
'https://c.wynne.rs/',
|
||||
'https://penfield.wynne.rs/',
|
||||
];
|
||||
|
||||
export const SECTIONS = {
|
||||
plaintext: 'plaintext',
|
||||
bookmarks: 'bookmarks',
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { getApprovedEntries, type GuestbookEntry } from '../lib/db';
|
|||
import { formatDate, extractDomain, formatListItem } from '../lib/format';
|
||||
import { organizePostsByCategory, getSlug, enrichPostsWithDates } from '../lib/md';
|
||||
import { getTxtFiles } from '../lib/txt';
|
||||
import { DEFAULT_CATEGORY, SECTIONS } from '../lib/consts';
|
||||
import { DEFAULT_CATEGORY, SECTIONS, SUBDOMAINS } from '../lib/consts';
|
||||
|
||||
const rawPosts = await getCollection('md');
|
||||
const posts = enrichPostsWithDates(rawPosts);
|
||||
|
|
@ -33,8 +33,7 @@ try {
|
|||
const urls = [
|
||||
...posts.map(post => ({ url: `/${getSlug(post.id)}`, date: post.dates.created.getTime() })),
|
||||
...txtFiles.map(f => ({ url: `/${f.name}`, date: f.date.getTime() })),
|
||||
...bookmarksCollection.map(b => ({ url: b.data.url, date: b.data.date.getTime() })),
|
||||
].sort((a, b) => b.date - a.date).map(e => e.url);
|
||||
].sort((a, b) => b.date - a.date).map(e => e.url).concat(SUBDOMAINS);
|
||||
---
|
||||
<Layout title="lewis m.w." isHome urls={urls}>
|
||||
|
||||
|
|
|
|||
|
|
@ -2,10 +2,7 @@ import { getCollection } from 'astro:content';
|
|||
import type { APIContext } from 'astro';
|
||||
import { getSlug } from '../lib/md';
|
||||
import { getTxtFileNames } from '../lib/txt';
|
||||
|
||||
const SUBDOMAINS = [
|
||||
'https://penfield.wynne.rs/',
|
||||
];
|
||||
import { SUBDOMAINS } from '../lib/consts';
|
||||
|
||||
export async function GET(context: APIContext) {
|
||||
const site = context.site?.origin ?? 'https://wynne.rs';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue