Skip to content

Singletons and types#344

Merged
avitorio merged 21 commits intoavitorio:canaryfrom
mathieudutour:f/singletons-and-types
Jan 25, 2026
Merged

Singletons and types#344
avitorio merged 21 commits intoavitorio:canaryfrom
mathieudutour:f/singletons-and-types

Conversation

@mathieudutour
Copy link
Contributor

@mathieudutour mathieudutour commented Jan 6, 2026

Sorry for the huge PR. This is built on top of #342 and #343.

It adds 2 things:

  • support for singleton documents. Each of them has a their own custom field. It adds a getSingletonSlugs and getSingletonBySlug API.
image - generation of types for the API based on your content. This makes using the API a lot safer Screenshot 2026-01-06 at 10 55 11 Screenshot 2026-01-06 at 10 55 26

It also updates the apps/dev to use both

I know it's a big change, not expecting you to merge it but feel free to take what you want from it - I find it pretty cool!

@changeset-bot
Copy link

changeset-bot bot commented Jan 6, 2026

🦋 Changeset detected

Latest commit: cad672e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
outstatic Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Contributor

vercel bot commented Jan 6, 2026

@mathieudutour is attempting to deploy a commit to the andre Team on Vercel.

A member of the Team first needs to authorize it.

@avitorio
Copy link
Owner

avitorio commented Jan 8, 2026

@mathieudutour this is awesome, thank you! I'm swamped with work until the end of the week, but will take a look at your PRs and incorporate them sometime next week. Cheers!

@avitorio
Copy link
Owner

Hey @mathieudutour

There's some great stuff in here.

I'm reviewing and trying to make a few changes to this PR.

I think I'll update the singleton creation to allow users to pick where they want to store the file, similar to how we now offer folder selection for collections, ex:

CleanShot 2026-01-16 at 17 14 14@2x

Let me know if you have any remarks. Thanks!

@mathieudutour
Copy link
Contributor Author

Ah yep that sounds good

@vercel
Copy link
Contributor

vercel bot commented Jan 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
outstatic-dev-blog Ready Ready Preview Jan 25, 2026 1:57am
outstatic-docs Ready Ready Preview Jan 25, 2026 1:57am
1 Skipped Deployment
Project Deployment Review Updated (UTC)
outstatic-advanced-blog Ignored Ignored Preview Jan 25, 2026 1:57am

@avitorio
Copy link
Owner

@mathieudutour thank you so much for your work here. I'm merging the PR.
These are all excellent additions to the project. Cheers!

@avitorio avitorio merged commit 1845b19 into avitorio:canary Jan 25, 2026
0 of 3 checks passed
@mathieudutour
Copy link
Contributor Author

Nice, awesome! I didn’t mention it but it’s probably a breaking change btw

@avitorio
Copy link
Owner

Thanks for the heads up. I'm going to test it with some old setups to see how it behaves before publishing.

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.

2 participants