diff --git a/astro.config.mjs b/astro.config.mjs index 82e214e..1579777 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -23,11 +23,13 @@ try { const fm = content.match(/^---\n([\s\S]*?)\n---/); if (!fm) continue; const dateMatch = fm[1].match(/^date:\s*["']?(\d{4}-\d{2}-\d{2})["']?\s*$/m); + const updatedMatch = fm[1].match(/^updated:\s*["']?(\d{4}-\d{2}-\d{2})["']?\s*$/m); const draftMatch = fm[1].match(/^draft:\s*(true|false)\s*$/m); if (draftMatch && draftMatch[1] === 'true') continue; - if (dateMatch) { + const stamp = updatedMatch?.[1] ?? dateMatch?.[1]; + if (stamp) { const slug = file.replace(/\.(mdx?|md)$/, ''); - postLastmod.set(`/blog/${slug}`, new Date(dateMatch[1])); + postLastmod.set(`/blog/${slug}`, new Date(stamp)); } } catch (err) { console.warn( @@ -43,7 +45,7 @@ try { } /** @type {string[]} */ -const SKIP_PATTERNS = ['/write']; +const SKIP_PATTERNS = ['/write', '/search']; /** * @param {string} path @@ -54,6 +56,7 @@ function priorityFor(path) { if (path === '/blog' || path === '/topics') return 0.9; if (path === '/playground' || path === '/community' || path === '/contribute') return 0.8; if (path.startsWith('/blog/')) return 0.7; + if (path.startsWith('/topics/') || path.startsWith('/tags/')) return 0.6; if (path.startsWith('/authors/')) return 0.6; return 0.5; } @@ -70,7 +73,7 @@ function changefreqFor(path) { export default defineConfig({ site: 'https://mlsystems.dev', - trailingSlash: 'ignore', + trailingSlash: 'never', markdown: { shikiConfig: { theme: 'github-dark' }, }, diff --git a/src/components/ArticleActions.tsx b/src/components/ArticleActions.tsx index 9710f3d..6c86406 100644 --- a/src/components/ArticleActions.tsx +++ b/src/components/ArticleActions.tsx @@ -1,6 +1,7 @@ 'use client'; import { useState } from 'react'; +import { SITE } from '@/lib/site'; export default function ArticleActions({ title, @@ -77,8 +78,8 @@ export default function ArticleActions({
{contributors.length} writers from labs, startups, and research groups working on the hard parts of ML systems. Every article is attributed — and most of them are open to questions on{' '} - Discussions. + Discussions.
Concrete over abstract. Numbers over adjectives. One idea per paragraph. Show your work,
including the parts that didn't.
diff --git a/src/pages/index.astro b/src/pages/index.astro
index b7554e0..e50d6e8 100644
--- a/src/pages/index.astro
+++ b/src/pages/index.astro
@@ -3,7 +3,7 @@ import { getCollection, getEntries } from 'astro:content';
import BaseLayout from '@/layouts/BaseLayout.astro';
import HeroFigure from '@/components/HeroFigure.tsx';
import ToolGlyph from '@/components/ToolGlyph.tsx';
-import { TOPICS, countPostsByTopic, formatDate, sortPostsByDate } from '@/lib/data';
+import { TOPICS, countPostsByTopic, formatDate, sortPostsByDate, topicName } from '@/lib/data';
import { SITE, SOCIALS } from '@/lib/site';
const allPostsRaw = (await getCollection('posts', ({ data }) => !data.draft)).sort(sortPostsByDate);
@@ -45,8 +45,8 @@ const featuredTools = allTools
---
{p.data.summary}
@@ -234,7 +234,7 @@ const featuredTools = allTools discussions, and feature proposals. Searchable, attributed, permanent. @@ -389,7 +389,7 @@ const featuredTools = allTools } .topic-tab.active { background: var(--accent); - color: #fff; + color: var(--paper); border-color: var(--accent); } .topic-tab-count { diff --git a/src/pages/og/page/[slug].png.ts b/src/pages/og/page/[slug].png.ts index 44ca2c4..e7d8f0f 100644 --- a/src/pages/og/page/[slug].png.ts +++ b/src/pages/og/page/[slug].png.ts @@ -9,6 +9,9 @@ const SECTIONS: Record+ {posts.length} + {posts.length === 1 ? 'article' : 'articles'} tagged {label}. +
+{a.data.summary}
+Every topic tag across the archive, most-used first.
+- Draft your post here — no Markdown, no setup. When you’re done, download a ready-to-publish - folder and send it to us as a pull request or by email. Prefer - writing MDX by hand? That works too — see the authoring guide.
+ That file is your whole post — text, images, everything we need to publish it. Here’s + how to send it to us: +
+ ++ Emailing? Attach the {sentFile} file — your browser saved it to your Downloads folder. +
+