sanity-io / sanity-template-astro-clean

Clean starter template with Astro
https://template-astro-clean.sanity.build/
117 stars 37 forks source link

Upgrade to allow suitably smooth on-ramp use of this starter template #40

Closed narration-sd closed 7 months ago

narration-sd commented 9 months ago

This PR, fully integrated and tested with the current fully working @sanity/astro, was inspired by what became a full-week session with an evidently experienced and capable, designer-focused developer, who was utterly blocked by the intricacies of the original package.

The result of upgrades to solve this is entirely in the spirit of Astro's own approach to TypeScript, fully implementing its ability to be used at any level of strictness, but not requiring this until a person may wish to do so.

As the revised Readme describes, there's also an addition to make nicely wrap-formatted images available embedded in Portable Text, to facilitate expectations of those who come over from platforms like WordPress.

You can see it operating here, on Vercel., and others in the Sanity arena have found it to 'just work', with the nice appearance extended, in the line as this starter originally intended.

Astro 4 ability is now included, up-to-date along with all other dependencies.

You'll note that in the Readme update, I've suggested the original heavy-TypeScript version be included on a branch, sans the script which soon became ineffective at down-conversion, and would always become so. This is in courtesy to the originators; personally I'm not sure it's a best idea, so especially listening for what you'd prefer. There could instead be just a reference respecting the original.

Will put this up in fully approval-ready form as soon as that underlying PR #140 can find its approval, and according with your comments here.

vercel[bot] commented 9 months ago

@narration-sd is attempting to deploy a commit to the Sanity Team on Vercel.

A member of the Team first needs to authorize it.

socket-security[bot] commented 9 months ago

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@astrojs/check@0.5.5 Transitive: environment, filesystem, network, unsafe +42 20.5 MB fredkschott, matthewp, natemoo-re
npm/@astrojs/react@3.0.10 Transitive: environment, filesystem, unsafe +64 17.6 MB fredkschott
npm/@astrojs/vercel@7.3.1 Transitive: environment, eval, filesystem, network, shell, unsafe +350 267 MB fredkschott
npm/@sanity/astro@2.2.1 Transitive: environment, eval, filesystem, network, shell, unsafe +683 600 MB ash, atombender, binoy14, ...41 more
npm/@sanity/vision@3.30.0 Transitive: environment +65 19.9 MB ash, atombender, binoy14, ...41 more
npm/@types/react-dom@18.2.19 None +4 1.71 MB types
npm/@types/react@18.2.57 None +3 1.68 MB types
npm/astro-portabletext@0.9.6 None +2 190 kB theisel
npm/astro@4.4.1 Transitive: environment, eval, filesystem, network, shell, unsafe +308 265 MB fredkschott, matthewp, natemoo-re
npm/autoprefixer@10.4.17 environment Transitive: filesystem +10 2.88 MB ai
npm/eslint@8.56.0 environment, filesystem Transitive: eval, shell, unsafe +78 10.1 MB eslintbot
npm/groq@3.30.0 None 0 8.83 kB ash, atombender, binoy14, ...42 more
npm/prettier-plugin-astro@0.13.0 environment Transitive: filesystem, unsafe +3 13.6 MB fredkschott
npm/prettier@3.2.5 environment, filesystem, unsafe 0 8.39 MB prettier-bot
npm/sanity-plugin-asset-source-unsplash@1.1.2 Transitive: environment, eval, filesystem, network, shell, unsafe +495 571 MB sanity-io
npm/sanity@3.30.0 Transitive: environment, eval, filesystem, network, shell, unsafe +488 566 MB ash, atombender, binoy14, ...41 more

🚮 Removed packages: npm/@astrojs/check@0.2.0, npm/@astrojs/react@3.0.2, npm/@astrojs/vercel@4.0.5, npm/@portabletext/types@2.0.7, npm/@sanity/astro@1.3.0, npm/@sanity/types@3.17.0, npm/@sanity/vision@3.17.0, npm/@types/react-dom@18.2.8, npm/@types/react@18.2.24, npm/astro@3.2.2, npm/autoprefixer@10.4.16, npm/eslint@8.50.0, npm/groq@3.17.0, npm/prettier@3.0.3, npm/rimraf@5.0.1, npm/sanity@3.17.0, npm/typescript@5.2.2

View full report↗︎

narration-sd commented 9 months ago

...disabled actions on the source of this PR; apologies for the attempted runs.

Also, I added a standard Sanity MIT license due to the snyk warning -- this warning remains; is there something else needed? Snyk won't let me access 'details' to find out...

[later: should have fixed this by progression in adding license: line to package.json, along with some standard Sanity boilerplate, but checks here may not have re-run because I killed Actions on my own repo that this PR draws from?

Perhaps it's just waiting its time...some of which I used to improve the demo text on the Vercel site, using this package's /admin built-in Studio.]

narration-sd commented 9 months ago

While doing the small upgrades after Snyk noticed about licensing, I found there's an introductory Sanity doc page, which I should be able update easily on its own PR as this one becomes approved, as it gets its text from the Readme which has already been updated here.

OliverSpeir commented 8 months ago

@narration-sd Thanks for this fantastic work

Hope to see this merged

narration-sd commented 8 months ago

@OliverSpeir thanks :) , and I'm on this, due to the very appreciated move of @stipsan today , who approved the fix enabling the official @sanity/astro package!

narration-sd commented 8 months ago

This PR should now be ready for approval. I've brought in the newly released @sanity/astro with its fix, and updated the README for this, also with some edits to improve.

I enabled Snyk on my repo, but this doesn't show a license issue, which I imagine is tied to a specific Sanity configuration. The license and its specification in the package.json seem to look fine, so please let me know if I need to change anything to pass the check - will do such immediately.

Thanks, and it will be very nice to see this upgrade on its way. I believe the 'smooth onramp' approach is very desirable for Sanity and Astro, as explained above, and as you can see, desire for it is showing :)

All of this work stands behind Sanity Astro Presentation, as intended, and that project is going quite well, soon I suspect to become more visible.

narration-sd commented 8 months ago

updated all to latest via ncu -u, through Astro 4.4.1; as anticipated, no problems

OliverSpeir commented 7 months ago

Any update on this @sjelfull @kmelve @narration-sd ?

kmelve commented 7 months ago

We will soon roll out updates to both the integration and the starters to better accommodate Visual Editing.

Although we greatly appreciate the efforts that went into this PR, we can't merge it pending these updates. Stay tuned!

(Of course, you're welcome to fork this template and submit as your own to sanity.io/templates!)

narration-sd commented 7 months ago

Any update on this @sjelfull @kmelve @narration-sd ?

Hi @OliverSpeir, actually I have a small improvement to bring over from a project using this; will do and let you know.

narration-sd commented 7 months ago

Any update on this @sjelfull @kmelve @narration-sd ?

And update is in, @OliverSpeir , on the pull request source, https://github.com/narration-sd/sanity-template-astro-clean

It's also updated to latest Astro and Sanity, and keeps the easy-onramps, helper-only TypeScript unless you want strict, as well as image-in-rich-text features