Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: make template Sanity CLI ready #46

Merged
merged 2 commits into from
Jan 18, 2025

Conversation

RostiMelk
Copy link
Contributor

@RostiMelk RostiMelk commented Jan 17, 2025

👋 We've introduced a way to init a template using the Sanity CLI. In order for this to work the template has to follow a small set of rules, which your template almost does with the exception of .env.example that contains spaces around the equal signs, not a part of the .env spec.

In addition we have also introduced some tooling to make sure your template is always valid. A GitHub action will run on every push to validate that the template follows the required conventions. You may read more about this in our WIP documentation, in this repo's README.

Usage

With this change you'll be able to initialize this template by running:

npm create sanity@latest -- --template https://github.com/nuotsu/sanitypress

or shorthand:

npm create sanity@latest -- --template nuotsu/sanitypress

Testing

You can test this out by running this against my fork here:

npm create sanity@latest -- --template https://github.com/RostiMelk/sanitypress

Copy link

vercel bot commented Jan 17, 2025

@RostiMelk is attempting to deploy a commit to the nuotsu Team on Vercel.

A member of the Team first needs to authorize it.

@nuotsu nuotsu self-assigned this Jan 18, 2025
Copy link

vercel bot commented Jan 18, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sanitypress ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 18, 2025 0:56am

@nuotsu nuotsu merged commit 653d086 into nuotsu:main Jan 18, 2025
2 checks passed
@nuotsu
Copy link
Owner

nuotsu commented Jan 18, 2025

@RostiMelk Thanks for all of this!

Just tested npm create sanity@latest -- --template nuotsu/sanitypress and works just fine 👍

Anything else to get the "⭐ Featured" badge on sanity.io/templates now for SanityPress?

@RostiMelk
Copy link
Contributor Author

Hey! Jon and I just messaged you in the Sanity community. We would love to collab with you on getting this featured!

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