![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
microcms-astro-loader
Advanced tools
microCMS Content Loader for the Astro Content Layer.
npm install microcms-astro-loader
In your src/content.config.ts
, define your collections with the microCMSContentLoader
function. This function will fetch all the content from the specified microCMS endpoint and store it in the data store.
import { defineCollection, z } from "astro:content";
import { microCMSContentLoader } from "microcms-astro-loader";
const posts = defineCollection({
loader: microCMSContentLoader({
apiKey: "your-microcms-api-key",
serviceDomain: "your-microcms-service-domain",
endpoint: "your-microcms-endpoint", // e.g. "blog" or "posts"
}),
// Define the schema of your content
schema: z.object({
id: z.string(),
title: z.string(),
description: z.string(),
content: z.string(),
thumbnail: z.object({
url: z.string().url(),
height: z.number(),
width: z.number(),
}).optional(),
}),
});
export const collections = { posts };
You can then use the content in your Astro pages:
---
import { getCollection } from "astro:content";
const posts = await getCollection("posts");
---
<ul>
{posts.map((post) => <li>{post.data.title}</li>)}
</ul>
There is also the microCMSObjectLoader
function, which is useful for loading a single object. You can use it in the same way as microCMSContentLoader
, but it will return a single object instead of an array.
You can find a demo project of this package on https://microcms-astro-loader-demo.vercel.app/. The source code for the demo is available in the playground
directory.
FAQs
microCMS Content Loader for Astro Content Layer
The npm package microcms-astro-loader receives a total of 7 weekly downloads. As such, microcms-astro-loader popularity was classified as not popular.
We found that microcms-astro-loader demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.