refactor: remove Content Collections and Dynamic Routes for minimalist approach#16
Merged
Merged
Conversation
…t approach Remove Astro-like features to focus on pure minimalist SSG: - Remove Content Collections (getCollection, getEntry, content.js) - Remove Dynamic Routes ([slug].jsx, buildDynamicRoute, getStaticPaths) - Remove marked dependency (only used for Content Collections) - Remove related example files and tests This reduces code by 908 lines while keeping core functionality: - JSX → HTML transformation - UnoCSS integration - Development server with live reload 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…nference
Barrels provide a simpler alternative to Content Collections:
- Auto-generate barrel files from `barrels/<name>/` directories
- Infer TypeScript Meta type from exported `meta` objects
- Optional fields detected by comparing all entries
- Watch mode support for automatic regeneration
Usage:
```
barrels/blog/
post1.tsx # export const meta = { title: "...", date: "..." }
post2.tsx # export const meta = { title: "...", tags: [...] }
```
Auto-generates:
```ts
// barrels/blog.ts
export type Meta = {
title: string;
date?: string;
tags?: string[];
};
export const posts = { ... };
```
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
markeddependency (only used for Content Collections)Motivation
Onoは「Astroのミニマルな代替」を目指しています。Content CollectionsやDynamic RoutesはAstroの複雑さの源であり、純粋ミニマル路線に舵を切るために削除しました。
Changes
src/content.jssrc/builder.js(Dynamic Routes)test/content.test.js合計: -908行
Remaining Core Features
Test plan
ono buildworks correctlyono devworks correctly🤖 Generated with Claude Code