--- /** * SPDX-License-Identifier: AGPL-3.0-or-later * SGY adaptation of the Onliine channel-menu interaction, 2026-10-25. * Original Onliine: Copyright (C) 2024 José Enrique. * See /channels/source/ for sources, exact upstream revisions and changes. */ import { getCollection, render } from 'astro:content'; import '../styles/channel-menu.css'; import ArticleMedia from './ArticleMedia.astro'; type ChannelDefinition = { id: string; kind: 'notes' | 'article' | 'link' | 'about'; title: string; subtitle: string; description: string; art: string; target: string; date: string; startLabel?: string; cover?: string; }; const posts = (await getCollection('blog')) .filter((post) => post.data.audience === 'public') .sort((a, b) => b.data.publishDate.getTime() - a.data.publishDate.getTime()); const featured = posts.filter((post) => post.data.featured).slice(0, 3); const renderedPosts = await Promise.all(featured.map(async (post) => ({ post, ...(await render(post)) }))); const postChannels = featured.map((post) => ({ id: `article-${post.id}`, kind: 'article', title: post.data.title, subtitle: post.data.channel?.label ?? post.data.title, description: post.data.description, art: post.data.channel?.artwork ?? 'notes', target: `/blog/${post.id}/`, date: post.data.publishDate.toISOString().slice(0, 10) })); const channels: ChannelDefinition[] = [ { id: 'notes', kind: 'notes', title: '公开笔记', subtitle: 'Notes Channel', description: `${posts.length} 篇公开文章,记录试过的方法和想明白的事。`, art: 'notes', target: '/blog/', date: '' }, ...postChannels, { id: 'guaidao', kind: 'link', title: '月下怪盗 · 天空之眼', subtitle: '小游戏 · 月下怪盗', description: '12 关潜行解谜,在巡逻与月光之间收集珍宝。本站单机版,无需登录,进度保存在当前浏览器,与星匣存档独立。', art: 'game', cover: '/images/guaidao-cover.png', target: '/games/guaidao.html', date: '', startLabel: '开始游戏' }, { id: 'qishuigang', kind: 'link', title: '汽水港 · 泡泡大作战', subtitle: '小游戏 · 汽水港', description: '放泡泡、躲水浪、救出伙伴,闯过三章九个街区。单人对战电脑机器人,支持键盘与触屏;进度保存在当前浏览器,与星匣存档独立。', art: 'game', cover: '/images/qishuigang-cover.png', target: '/games/qishuigang.html', date: '', startLabel: '开始游戏' }, { id: 'workbench', kind: 'link', title: '好奇心工作台', subtitle: 'Workbench Channel', description: '翻开笔记、拆解网页效果,再往下逛,让一张小桌面随滚动慢慢长成亮着灯的小站。', art: 'workbench', target: '/workbench/', date: '', startLabel: '进入工作台' }, { id: 'about', kind: 'about', title: '关于刚毅', subtitle: 'SGY Channel', description: '这个网站用来记录 AI 实践、工具选择,以及一个想法怎样变成可以复用的东西。', art: 'about', target: '/about/', date: '' } ]; const canonicalUrl = new URL('/', Astro.site ?? Astro.url.origin); const coverUrl = new URL('/images/channel-home.png', Astro.site ?? Astro.url.origin); --- 刚毅的频道 · SGY AI Log
SGY PERSONAL CHANNELS
今天,打开哪个频道?

刚毅的频道

把公开笔记,装进一台小主机。

{channels.map((channel) => ( ))} {Array.from({ length: Math.max(0, 8 - channels.length) }, () => )}
开源来源与本版源码原创内容 © {new Date().getFullYear()} 刚毅用真实笔记填满频道 · 无需登录
CHANNEL PREVIEW

先看看,再进去。