Skip to content

refactor: remove Content Collections and Dynamic Routes for minimalist approach#16

Merged
hashrock merged 3 commits into
mainfrom
remove-content-collections-dynamic-routes
Jan 4, 2026
Merged

refactor: remove Content Collections and Dynamic Routes for minimalist approach#16
hashrock merged 3 commits into
mainfrom
remove-content-collections-dynamic-routes

Conversation

@hashrock

@hashrock hashrock commented Jan 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Remove Content Collections feature (getCollection, getEntry, content.js)
  • Remove Dynamic Routes feature ([slug].jsx, buildDynamicRoute, getStaticPaths)
  • Remove marked dependency (only used for Content Collections)
  • Remove related example files, test fixtures, and tests

Motivation

Onoは「Astroのミニマルな代替」を目指しています。Content CollectionsやDynamic RoutesはAstroの複雑さの源であり、純粋ミニマル路線に舵を切るために削除しました。

Changes

削除項目 行数
src/content.js -272行
src/builder.js (Dynamic Routes) -133行
test/content.test.js -197行
example/content関連 -231行
test-content/ -53行

合計: -908行

Remaining Core Features

  • JSX → HTML transformation
  • UnoCSS integration
  • Development server with live reload

Test plan

  • All existing tests pass (119/119)
  • ono build works correctly
  • ono dev works correctly

🤖 Generated with Claude Code

hashrock and others added 3 commits January 4, 2026 15:50
…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>
@hashrock
hashrock merged commit a732c76 into main Jan 4, 2026
5 checks passed
@hashrock
hashrock deleted the remove-content-collections-dynamic-routes branch January 4, 2026 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant