Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
@sanity/astro
Advanced tools
Official Sanity Astro integration
In your Astro project, run the following command to install the Sanity Astro integration
npx astro add @sanity/astro
Configure the integration in your astro.config.mjs
file. The configuration options are the same as for @sanity/client.
import sanity from "@sanity/astro";
import { defineConfig } from "astro/config";
// https://astro.build/config
export default defineConfig({
integrations: [
sanity({
projectId: "3do82whm",
dataset: "next",
useCdn: true,
}),
],
});
We recommend using astro-portabletext to render your PortableText fields in Astro. See an example of this in apps/example/src/components/PortableText.astro, including using custom components to render custom blocks and annotations.
We recommend using @sanity/image-url to help you generate URLs for presenting Sanity images in your Astro app. See an example of this in apps/example/src/components/SanityImage.astro
Please see our guided tutorial on how to create a blog with Sanity content in Astro to get started from scratch with both Sanity and Astro.
FAQs
Official Sanity Astro integration
The npm package @sanity/astro receives a total of 4,979 weekly downloads. As such, @sanity/astro popularity was classified as popular.
We found that @sanity/astro demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 56 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.