Thinkmill / Thinkmill/keystatic

Feature: keystaticToAstroCollections

Open
#336 7 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

roadmap
Dominant language
TypeScript
Stars
2.4k
Forks
159
Avg merge
21h 41m
Merged PRs (30d)
2

Description

As mentioned in https://youtu.be/6l2YWCyPsWk, it would be great to have a keystaticToAstroCollection utility exported by @keystatic/astro to translate the Keystatic config to the Astro collections config.

Example usage:

// src/content/config.ts
import keystaticConfig from "../../keystatic.config"
import { keystaticToAstroCollection } from "@keystatic/astro"

const keystaticCollections = keystaticToAstroCollection(keystaticConfig)

export const collections = {
	...keystaticCollections
}

I made some experiments at the type level but collections and singletons specific types are lost once past to the config

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the src/content/config.ts example, the imported keystatic.config, and the @keystatic/astro package entry point. Trace how collection and singleton types are represented and where they are lost in the configuration flow. Done means the package exports keystaticToAstroCollection and the example produces an Astro collections configuration with those specific types preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.