Codync
免費、開源的 1:1 替代方案,取代 Grok Bot 與 Muse。從 iPhone、Mac 或 Linux 桌面將 Claude Code、Codex、Cursor 與 40+ 程式碼代理人作為持續機器人傳訊。群組聊天、主題串…
AI 翻譯
尚未收集儲存庫資訊。
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
AstroSage — a readability-first Astro blog theme (fork of AstroPaper)
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗A readability-first blog theme for Astro: serif type set for long reading, a warm paper palette, a table of contents that stays pinned beside the text, build-time KaTeX, Expressive Code, and optional GitHub-backed comments (utterances or giscus). It builds a fully static site for any host.
Live demo: astro-sage.chintak.sh · Every element on one page: the showcase post · All features: FEATURES.md
Built for Astro 7 with Tailwind CSS 4, MDX, Expressive Code, KaTeX and Pagefind. Forked from AstroPaper by Sat Naing and rebuilt as an Astro integration.
| Light | Dark |
|---|---|
text-wrap: pretty, old-style figures, optional optical sizing.$…$ and $$…$$ rendered by KaTeX at build time. No math JavaScript, and KaTeX CSS loads only on posts that use it.> [!NOTE]) or directives (:::warning[Title]). Both produce the same markup.[[slug]], [[slug|text]], [[slug#Heading]] and [[#Heading]] link posts by slug, path or title (case-insensitive), titled for you. A target that's missing, a draft or still scheduled renders as muted text and warns at build time. Inside a table, escape the pipe: [[slug\|text]].rel="noopener"); links within the site keep a plain underline.series: "Name" in frontmatter gives an index page, a per-series page and "Part N of M" navigation.shareLinks ({url} / {title} placeholders).quote.png on desktop. Nothing is pre-rendered and no server is involved; the code loads only after the first selection.citation: { author: "Sheth, Chintak" }; cite: false in frontmatter to hide).Requires Node 22.12+ and pnpm (the template is a pnpm workspace).
pnpm create astro@latest my-blog --template chintak/astro-sage
cd my-blog
pnpm dev
This gives you the theme (packages/astro-sage) and a ready-to-edit site (apps/demo), the same code that runs the live demo. Make it yours:
apps/demo/sage.config.ts: site URL, title, author, socials.apps/demo/src/content/posts/ and the page in apps/demo/src/content/pages/about.md.pnpm build writes the site to apps/demo/dist/. It's a plain static site: deploy it to any static host (Netlify, Vercel, GitHub Pages, Cloudflare, S3, your own server). The live demo happens to use Cloudflare (pnpm deploy:demo, configured in apps/demo/wrangler.jsonc); you can delete that file.Install the theme from npm (any package manager works):
pnpm add astro-sage
Then wire it up:
// astro.config.ts
import { defineConfig } from "astro/config";
import astroSage from "astro-sage";
import sageConfig from "./sage.config";
export default defineConfig({
site: sageConfig.site.url,
integrations: [astroSage(sageConfig)],
});
// src/content.config.ts
import { defineSageCollections } from "astro-sage/content";
import config from "../sage.config";
export const collections = defineSageCollections({ author: config.site.author });
// sage.config.ts
import { defineSageConfig } from "astro-sage";
export default defineSageConfig({
site: {
url: "https://example.com/",
title: "My notes",
description: "Things I learned.",
author: "Ada Lovelace",
},
typography: { serif: "newsreader" }, // or "source-serif-4" | "literata"
home: { intro: "A short paragraph shown on the home page." },
});
Every option is listed in FEATURES.md.
Write posts in src/content/posts/ (.md or .mdx; a folder with index.mdx works too) and pages in src/content/pages/ (about.md). The theme injects every route, so your site needs no page files.
title: "Attention is all you need, annotated"
description: "One-line summary used in lists, RSS and meta tags."
pubDatetime: 2026-10-15T09:00:00Z
tags: ["ml", "transformers"]
series: "Reading papers" # optional
featured: true # optional
toc: true # default true
math: true # default true; set false to skip KaTeX CSS
comments: true # default true (when comments are configured)
cite: true # default true: show the "Cite this post" block
```mermaid title="How a post is built"
flowchart LR
md[Markdown] --> html[HTML]
```
```excalidraw title="Pasted from Excalidraw"
{ "type": "excalidraw/clipboard", "elements": [ ... ] }
```


Diagrams are rendered once, at build time, in headless Chromium (pnpm add -D playwright && npx playwright install chromium, or an installed Chrome). The SVG is cached in .sage-cache/diagrams/. Commit that folder, and deploy builds won't need a browser or network. Add wide or full (a code-fence flag or the image title) to break out of the column. See Breakout figures below. Readers can expand any diagram into a zoom/pan viewer. Design notes: docs/decisions/005-code-and-diagrams.md.
Images, diagrams and figures come in three sizes, written the same way everywhere:
| Size | Width | Markdown image / Excalidraw | Diagram fence | Component |
|---|---|---|---|---|
| column | the reading column |  | ```mermaid | <Figure src={x} alt="…" /> |
| wide | column + TOC rail (up to 64rem without the rail) |  | ```mermaid wide | <Figure … size="wide" /> |
| full | the whole viewport, minus the page gutter on each side |  | ```mermaid full | <Figure … size="full" /> |
Captions are centred under the figure. The pinned TOC fades out while a wide or full figure passes beneath it. Markdown images use their alt text as the caption.
AstroSage builds a fully static site, so comments come from a GitHub-backed widget that runs in the reader's browser. Pick one in sage.config.ts:
// utterances: one GitHub issue per post. Install https://github.com/apps/utterances on the repo.
comments: { provider: "utterances", repo: "you/your-repo", label: "comments" },
// giscus: one GitHub Discussion per post, with reactions. Enable Discussions,
// install https://github.com/apps/giscus, and copy the ids from https://giscus.app.
comments: {
provider: "giscus",
repo: "you/your-repo",
repoId: "R_…",
category: "Comments",
categoryId: "DIC_…",
},
Both load only when the comments section nears the viewport, follow the theme toggle, and accept theme: { light, dark } (a theme name, or for giscus a CSS URL). Readers sign in with GitHub. Set comments: false in a post's frontmatter to hide them there.
pnpm install
pnpm dev # demo site at http://localhost:4321, showcase at /posts/showcase/
pnpm build
pnpm test # Playwright + axe, desktop and mobile
pnpm lint && pnpm format:check
The showcase post (apps/demo/src/content/posts/showcase/index.mdx) exercises every feature and is what the tests run against.
Every pull request gets a live preview of the demo. .github/workflows/preview.yml uploads each push as a version of the demo Worker without deploying it, and keeps one PR comment up to date with the preview URL and the commit it serves.
| AstroPaper | AstroSage |
|---|---|
astro-paper.config.ts | sage.config.ts with defineSageConfig (same site, posts, features, socials, shareLinks, plus typography, home, comments) |
src/pages/* in your repo | injected by the integration |
## Table of contents heading | automatic right-rail TOC (toc: false to hide) |
| rehype-callouts syntax | GitHub alerts or :::type[Title] |
Shiki transformers (// [!code ++]) | Expressive Code meta: ins={4}, del={3}, {1-2}, "word", collapse={1-4} |
AstroSage follows SemVer and is published to npm as astro-sage; upgrade with pnpm update astro-sage. Each release is also a git tag ([email protected]) with notes in packages/astro-sage/CHANGELOG.md and on GitHub Releases. Changes are recorded with Changesets.
packages/astro-sage/ the theme (integration, routes, components, styles, markdown plugins, comments)
apps/demo/ demo site and showcase post; Playwright tests
docs/decisions/ architecture decision records
FEATURES.md every feature, option and frontmatter field, with examples
AGENTS.md conventions for contributors and coding agents
MIT. See LICENSE. Based on AstroPaper © Sat Naing.