AstroStarter

Refined-X — Astro Starter Template

By tower1229

A personal publishing starter built on Astro and Starlight that generates multiple outputs for readers, search engines, and AI agents from a single Markdown/YAML content source.

Explore the design

Compare the page layouts and mobile experience. Open any screenshot for a closer look.

3 previews
Desktop homepage1 / 3
Desktop captureTop of page

Actual screenshot captured by the server browser.

All pages & views 3

Screenshots show visual appearance; interactive behavior may differ.

Recorded 2026-10-02View source

What stands out

A quick read of the recorded project description.

01

Generates three types of output from the same Markdown/YAML corpus: a human-readable website, machine-readable mirrors, and agent-queryable interfaces

02

Content and theme are decoupled; contentRoot, publicDir, and outDir are configurable, allowing connection to a personal knowledge base outside the template

03

The default site is fully static; /ask retrieves curated Q&A and public articles without a model, database, or runtime cost

04

The optional Public Ask Worker provides an NLWeb-compatible /ask and an MCP ask tool, with quotas, rate limits, and source links

05

At build time, article frontmatter dates, slugs, summaries, Q&A fields, and content types are validated

06

Built-in light and dark themes and an editorial-style visual system, with support for giscus article comments (requires a GitHub account to participate)

Template Details

Refined-X is a personal publishing starter built with Astro and Starlight, designed for the scenario of "publish once, serve humans, search engines, and AI agents simultaneously." Content is written in Markdown and YAML, and at build time three types of output are generated from the same public corpus: an editorial-style website for human readers (articles, series, projects, profile, Q&A, topics, light and dark themes); machine-readable artifacts for language models (per-page Markdown mirrors, llms.txt, llms-full.txt, structured JSON, OpenAPI); and discovery metadata plus optional query interfaces for programmatic clients.

The content model has an explicit schema: the default public corpus lives in the content/ directory, containing subdirectories such as articles, answers, pages, profile, projects, and series. Article frontmatter requires fields including title, description, contentType, pubDate, slug, and llmSummary. At build time, required dates, slugs, summaries, Q&A fields, and content types are validated. Content and theme are decoupled; contentRoot, publicDir, and outDir are configurable, allowing a personal knowledge base or monorepo to live outside the template, using Refined-X only as the publishing layer.

The site is fully static by default and can be deployed to GitHub Pages, Cloudflare Pages, Netlify, or any static host. The default /ask retrieves curated Q&A and public articles without a model, database, or runtime cost. The optional Public Ask Worker provides retrieval-based live Q&A, exposing a restricted NLWeb-compatible /ask endpoint and a Streamable HTTP MCP service (an ask tool on /mcp), with quotas, rate limits, browser verification, source links, and explicit capability boundaries; this service does not support long-term memory, arbitrary actions, prompting, or impersonating the site owner.

The README explicitly lists its scope: it is a static-first personal publishing starter, an opinionated public content schema, and a reference implementation for agent-readable and queryable surfaces; it is not a hosted CMS, nor a private personal system. Machine-readable endpoints (llms.txt, per-page .md, /api/*.json, /openapi.json, /.well-known/about.json) make content easy to ingest and connect, but do not guarantee that every agent will automatically discover or call them. Legacy draft MCP discovery paths (such as /.well-known/mcp.json) were removed in a breaking change, and /.well-known/ai-catalog.json is not provided.

AstroStarter

Is it right for your project?

Use Cases

  • Personal blog or portfolio: write articles, projects, and profile in Markdown and publish as a static website
  • Want content to be read by AI agents and language models: expose the public corpus via llms.txt, per-page Markdown, and JSON APIs
  • Use a personal knowledge base or monorepo as the content source, with Refined-X only as the publishing layer, connected via submodule and instance.config.mjs
  • Add retrieval-based live Q&A and MCP query capabilities on demand on top of a static site
  • Need article comments without building a backend: integrate giscus and reuse GitHub Discussions

Suitable For

  • Individual publishers who write in Markdown and want to serve both readers and AI agents
  • Developers willing to maintain their own repository and content schema, preferring static hosting
  • Users who need to separate content from theme and embed the publishing layer into an existing knowledge base or monorepo
  • Teams or individuals who want to enable Q&A and MCP interfaces on demand without introducing runtime dependencies by default

Getting started & customization

Use these recorded setup notes alongside the repository instructions for your chosen version.

  1. 1

    Initialize via the GitHub template or npm create astro, install dependencies, then run npm run dev to view the local site

  2. 2

    Before deployment, run npm run check, test:public-ask, test:related, build, and verify in sequence

  3. 3

    Most configuration is overridden via instance.config.mjs; you can also modify fields such as site, title, locale, contentRoot, publicDir, outDir, and brand in site.config.mjs

  4. 4

    Enabling comments requires configuring giscus's repo, repoId, category, and categoryId; missing items will cause the build to fail

  5. 5

    Enabling Live Ask requires first deploying the Cloudflare Worker in examples/public-ask-worker, then filling in askUrl, mcpUrl, and healthUrl in the configuration

Read repository instructions

License & source material

Usage conditions & limitations

Free to use · keep license notice

This entry covers the free version under the MIT license in the public repository; the free scope is the code of that version and does not mean that external services or third-party assets are free.

Must comply with when using

  • Free use, modification, commercial use, and distribution of this version's code are permitted.
  • When distributing copies or substantial portions of the code, retain the original author's copyright notice and the full MIT license notice.
  • The code is provided as is; warranties and limitations of liability are governed by the original license and applicable law.

Additional costs & items to verify

  • After enabling giscus comments, visitors must have a GitHub account to participate in discussions; comment data is stored in a public GitHub Discussions repository.
  • Live Ask is an optional feature that requires deploying a Cloudflare Worker yourself and bearing the corresponding infrastructure and runtime costs; the default static site does not include this capability.
  • When using browser-side generation features, a Cloudflare Turnstile site key must be configured at build time, relying on that third-party verification service.
  • Enabling comments requires installing the giscus GitHub App and creating a discussion category, relying on the GitHub platform and a third-party app.
  • assetSource is an optional external image library configuration; when enabled, you must provide and maintain that external resource yourself.
  • Demo images, fonts, icons, and other third-party assets must be checked against their respective licenses; the MIT license of the code alone is not sufficient to determine this.
  • External services such as domains, hosting, databases, payments, or AI may incur additional charges.
View Original Text Basis

Permission is hereby granted, free of charge

Original License Text

Visitors need a GitHub account to participate.

Original README

Optional Cloudflare Worker for grounded browser answers, NLWeb `POST /ask`, and MCP `ask`.

Original README

Set `PUBLIC_TURNSTILE_SITE_KEY` at Astro build time when using browser generation.

Original README

install the giscus GitHub App, create a discussion category, then copy the four public identifiers

Original README

`assetSource` | unset | Optional external image library

Original README
https://github.com/tower1229/Refined-X/blob/main/LICENSEhttps://github.com/tower1229/Refined-X/blob/main/README.md

Compiled by DeepSeek based on repository license and README ·2026-10-02. Results only cover the materials read; dependencies, images, fonts, and subsequent term changes are subject to their respective original texts.

Project checks & description sources

Template Information

Source platforms
Astro Themes
Documentation and maintenance reference score
More documented · 83 / 100
Technologies
Astro
Website type
Starter
How this score is calculated

Our heuristic uses license records (up to 30), a demo link (12), a preview (10), stars (15), recorded maintenance (15), description completeness (8), feature records (5) and classification data (5). It is not a code, security or performance test, or a Google score. A link does not establish tested functionality.

What to verify for this project

Repository update recorded
2026-09-18
Screenshot last checked
2026-10-02

A demo link is listed. Check it with your own content and viewport sizes; its presence does not confirm that forms, authentication or payments work.

The catalog identifies Astro as the primary stack. Check the actual dependency manifest and lockfile for versions and hosting requirements. These notes use recorded metadata, not a code audit or a deployment test.

Use a selection guide →

How this description was prepared

AI-assisted description based on catalog records and repository material. Repository authors are not automatically the reviewers of this description.

Automatically checked against source and license rules; no manual editorial review.

Inspect the recorded source material

SHA-256: 1cea9d09c0039139bb64d1ff0185e201cf7a469189dc64b50fbc0ace7b3eb0c3

2026-10-02T19:16:08.777Z

Source file / repository
English | [简体中文](README.zh-CN.md)

# Refined-X

## Your public interface for the agentic web

Publish once for people, search engines, and AI agents.

Refined-X is an opinionated personal publishing starter built with
[Astro](https://astro.build/) and [Starlight](https://starlight.astro.build/).
Write in Markdown and YAML; Refined-X turns the same public corpus into:

- a calm, editorial website for human readers;
- Markdown mirrors, `llms.txt`, and structured JSON for language models;
- OpenAPI and MCP discovery metadata for programmatic clients;
- an optional NLWeb-compatible Ask service for live, grounded Q&A.

Your content stays in your own repository or knowledge vault. The site is
static by default, and the AI service is optional.

[Live demo](https://demo.refined-x.com) ·
[Ask the demo](https://demo.refined-x.com/ask/) ·
[Use this template](https://github.com/new?template_name=Refined-X&template_owner=tower1229) ·
[Production example](https://refined-x.com)

![Refined-X home page](docs/screenshots/home.jpg)

## Why Refined-X?

Most personal sites publish HTML and stop there. That works for browsers, but
agents must still extract meaning from navigation, layout, and scripts.

Refined-X publishes one source corpus through three surfaces:

| Surface          | What it provides                                                        |
| ---------------- | ----------------------------------------------------------------------- |
| Human-readable   | Articles, series, projects, profile, answers, topics, light/dark themes |
| Machine-readable | Per-page Markdown, `llms.txt`, `llms-full.txt`, JSON APIs, OpenAPI      |
| Agent-queryable  | Static curated search, optional NLWeb `/ask`, optional MCP `ask` tool   |

```mermaid
flowchart LR
  A["Markdown + YAML"] --> B["Refined-X build"]
  B --> C["Editorial website"]
  B --> D["Agent-readable surfaces"]
  D --> E["Optional Public Ask"]
```

## What makes it different

### One corpus, multiple outputs

Articles, answers, projects, series, and public profile data share an explicit
content schema. Refined-X generates the website and every machine-readable
surface from that same source of truth.

### Content independent from the theme

`contentRoot`, `publicDir`, and `outDir` are configurable. Keep a personal
vault or monorepo outside the template, and use Refined-X only as the publishing
layer.

### Useful without an AI backend

The default site is fully static. `/ask` searches curated answers and public
articles without a model, database, or runtime bill.

### Live Q&A when you want it

The optional Public Ask Worker adds grounded retrieval and summarization through
a restricted NLWeb v0.55-compatible `/ask` endpoint and a dual-era Streamable HTTP MCP
server (one `ask` tool on `/mcp` for modern `2026-07-28` and legacy 2025 clients).
Offline dual-era integration runs in CI; product-client verification is recorded in
[`docs/mcp-client-support-matrix.md`](docs/mcp-client-support-matrix.md) (core: Claude Code modern + Codex CLI legacy on a synthetic mock backend; other clients stay `not_run`).
It includes quotas, rate limits, browser verification, source links,
and explicit capability boundaries.

### Designed for reading

Agent support is not allowed to turn the site into a dashboard. Refined-X keeps
an editorial, monochrome visual system with restrained motion and accessible
light/dark themes.

## Quick start

This repository is a GitHub template. Select
[Use this template](https://github.com/new?template_name=Refined-X&template_owner=tower1229),
or run:

```sh
npm create astro@latest -- --template tower1229/Refined-X
cd <project>
npm install
npm run dev
```

Then open the local URL printed by Astro.

Before deploying:

```sh
npm run check
npm run test:public-ask
npm run test:related
npm run build
npm run verify
```

## Choose a deployment mode

| Mode                    | Infrastructure                                              | Result                                                                             |
| ----------------------- | ----------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| Static                  | GitHub Pages, Cloudflare Pages, Netlify, or any static host | Website, local Ask search, Markdown, `llms.txt`, JSON, OpenAPI, discovery metadata |
| Static + external vault | Static host plus an external `contentRoot`                  | Same outputs while content remains outside the template                            |
| Live Ask                | Static site plus the reference Cloudflare Worker            | Grounded browser answers, NLWeb `/ask`, MCP `ask`, health endpoint                 |

Start static. Add Live Ask only when conversational access is useful.

## Deploy static site

| Path | Guide |
| ---- | ----- |
| GitHub Pages | Copy [`deploy/user-github-pages.yml`](deploy/user-github-pages.yml) → enable Pages (GitHub Actions) |
| Cloudflare Pages | Build `npm run build`, output `dist`, Node `24` |

Step-by-step: [`docs/deploy-static.md`](docs/deploy-static.md).

Cloudflare Pages: connect the repo in the [dashboard](https://dash.cloudflare.com/) ([git integration docs](https://developers.cloudflare.com/pages/get-started/git-integration/)). GitHub Pages: copy the workflow linked above.

## Content model

The default public corpus lives in `content/`:

```text
content/
  articles/**/*.md
  answers/**/*.md
  pages/**/*.md
  profile/
    person.yaml
    cooperation.yaml
    resume.md
  projects/*.{yaml,yml,json}
  series/
    series.json
    *.yaml
```

Article frontmatter is intentionally explicit:

```yaml
---
title: Building for humans and agents
description: A short description for readers and search engines.
contentType: article
pubDate: 2026-07-01
slug: humans-and-agents
series: notes
tags:
  - publishing
  - agents
llmSummary: A concise, evidence-grounded summary for machine-readable outputs.
---
```

The schema validates required dates, slugs, summaries, answer fields, and
content types during the build.

## Configure your site

For most installations, create an `instance.config.mjs` overlay. You can also
edit the defaults in [`site.config.mjs`](site.config.mjs):

```js
export default {
  site: "https://example.com",
  title: "Your Name",
  locale: "en",
  timeZone: "UTC",
  contentRoot: "./content",
  publicDir: "./public",
  outDir: "./dist",
  brand: {
    persona: "Your Name",
    homeHeading: "Your Name",
    homeLede: "What you publish and why it matters.",
  },
};
```

Common options:

| Field         | Default     | Purpose                                   |
| ------------- | ----------- | ----------------------------------------- |
| `locale`      | `en`        | UI language pack: `en` or `zh-CN`         |
| `contentRoot` | `./content` | Public Markdown/YAML corpus               |
| `publicDir`   | `./public`  | Static assets                             |
| `outDir`      | `./dist`    | Build output                              |
| `assetSource` | unset       | Optional external image library           |
| `brand.*`     | demo values | Public identity and home-page copy        |
| `ask.*`       | empty       | Optional Public Ask / MCP / health URLs; `protocolProfile` defaults to `undeclared` (set `dual-era` only after deployment acceptance) |
| `discovery.awp` | `false`   | Optional AWP 0.2 manifests; when `true`, emits byte-identical `/agent.json` and `/.well-known/agent.json` (phase-1 static reads only); llms does not auto-recommend them; subpath deploy limits — see plan §8.3 |
| `comments.*`  | empty       | Optional giscus repository and category   |

Relative paths resolve from the Refined-X package root.

## Enable article comments

Refined-X can load [giscus](https://giscus.app/) on article pages and keep the
discussion data in a public GitHub Discussions repository. Enable Discussions,
install the giscus GitHub App, create a discussion category, then copy the four
public identifiers from the giscus configuration page:

```js
export default {
  comments: {
    repo: "owner/repository",
    repoId: "R_...",
    category: "Comments",
    categoryId: "DIC_...",
  },
};
```

Leave all four fields empty to disable comments. A partial configuration fails
the build instead of silently publishing a broken surface. Refined-X uses a
stable `article:<entry.id>` discussion key, follows the site locale and theme,
and loads the third-party iframe lazily. Visitors need a GitHub account to
participate.

## Agent-readable surfaces

Every build exposes a predictable public interface:

| Endpoint                            | Purpose                                         |
| ----------------------------------- | ----------------------------------------------- |
| `/llms.txt`                         | Compact site map and important links for agents |
| `/llms-full.txt`                    | Full public text corpus                         |
| `/<page>.md`                        | Clean Markdown mirror of a public page          |
| `/api/profile.json`                 | Structured public identity                      |
| `/api/articles.json`                | Article catalog                                 |
| `/api/topics.json`                  | Topic catalog                                   |
| `/api/search-index.json`            | Static Ask/search corpus                        |
| `/openapi.json`                     | API and optional Ask/MCP contract (only declares configured remotes) |
| `/.well-known/about.json`           | Site capability summary                         |

These endpoints make the site easier to ingest and connect. They do not assume
that every agent automatically discovers or invokes them.

Legacy draft MCP discovery paths (`/.well-known/mcp.json`,
`/.well-known/mcp/catalog.json`, `/.well-known/mcp/server-card.json`) were
**removed** in a breaking change. Prefer the configured MCP endpoint URL,
OpenAPI, and `about.json`. Do not expect `/.well-known/ai-catalog.json`.

## Enable Live Ask

Optional Cloudflare Worker for grounded browser answers, NLWeb `POST /ask`, and
MCP `ask`. Package: [`examples/public-ask-worker`](examples/public-ask-worker).

**Deploy checklist and troubleshooting:** [`docs/deploy-live-ask.md`](docs/deploy-live-ask.md).

After the Worker is up, point the static site at it:

```js
export default {
  ask: {
    askUrl: "https://ask.example.com/ask",
    mcpUrl: "https://ask.example.com/mcp",
    healthUrl: "https://ask.example.com/health",
    // Optional. Default undeclared — do not claim modern dual-era until accepted.
    // protocolProfile: "dual-era",
  },
};
```

Set `PUBLIC_TURNSTILE_SITE_KEY` at Astro build time when using browser generation.
The hosted demo uses `https://ask-demo.refined-x.com/mcp`.

Live Ask intentionally does not support long-term memory, arbitrary actions,
elicitation, or impersonating the site owner.

## Use an external vault

Refined-X can live as a submodule inside a personal data repository:

```sh
git submodule add [email protected]:tower1229/Refined-X.git 90_Website/Template
```

Place `instance.config.mjs` next to the submodule, or set
`REFINED_X_INSTANCE_CONFIG`:

```js
export default {
  contentRoot: "../../20_Publish",
  publicDir: "../../30_Assets/Public",
  outDir: "../../dist",
};
```

Instance-specific settings stay outside the template, so upstream updates do
not overwrite your identity or content.

## Design

See [`DESIGN.md`](DESIGN.md) for the visual system, typography, component
rules, motion boundaries, and accessibility guidance.

![Refined-X cover — cascade](docs/community-cover/refined-x-cover-ink.png)

![Refined-X cover — collage](docs/community-cover/refined-x-cover-paper.png)

## Scope

Refined-X is:

- a static-first personal publishing starter;
- an opinionated public content schema;
- a reference implementation for agent-readable and agent-queryable surfaces.

Refined-X is not:

- a hosted CMS;
- a private personal agent;
- a long-term memory service;
- a promise of automatic MCP discovery in every client;
- a claim that every MCP client in the extended matrix has been product-verified (see [`docs/mcp-client-support-matrix.md`](docs/mcp-client-support-matrix.md)).

## Contributing

Issues, implementation reports, documentation improvements, and pull requests
are welcome. If you launch a site with Refined-X, open a showcase issue so it
can be included in the community gallery.

- [Contributing guide](CONTRIBUTING.md)
- [Changelog](CHANGELOG.md)
- [Security policy](SECURITY.md)
- [Roadmap](ROADMAP.md)

## License

[MIT](LICENSE)
Report a correction

Explore similar templates

Compare previews and descriptions within the same stack and category.