Skip to content

将 CMS 与 Astro 结合使用

准备好将 Headless CMS 连接到你的 Astro 项目了吗?按照我们的指南之一集成 CMS。

¥Ready to connect a Headless CMS to your Astro project? Follow one of our guides to integrate a CMS.

¥CMS Guides

请注意,这些页面中的许多都是存根:它们是资源的集合,等待你的贡献!

¥Note that many of these pages are stubs: they’re collections of resources waiting for your contribution!

为什么要使用内容管理系统?

标题部分 为什么要使用内容管理系统?

¥Why use a CMS?

内容管理系统可让你在 Astro 项目之外编写内容并管理资源。

¥A Content Management System lets you write content and manage assets outside of your Astro project.

这解锁了处理内容的新功能。大多数 CMS 为你提供可视化内容编辑器、指定标准内容类型的能力以及与他人协作的方式。

¥This unlocks new features for working with content. Most CMSes give you a visual content editor, the ability to specify standard types of content, and a way to collaborate with others.

CMS 对于遵循特定结构的内容非常有用,通常为你提供类似仪表板的体验和所见即所得的编辑工具。你可以使用 CMS 的富文本编辑器而不是 Markdown 文件来编写博客文章。或者,你可以使用 CMS 来维护电子商务存储的产品列表,将某些字段设置为必填字段以避免列表不完整。

¥A CMS can be useful for content that follows a particular structure, often giving you a dashboard-like experience and WYSIWYG editing tools. You might use a CMS to write blog posts using a CMS’s rich text editor instead of Markdown files. Or you might use a CMS to maintain product listings for an eCommerce shop, making certain fields required to avoid incomplete listings.

然后,你的 Astro 项目可以从 CMS 获取你的内容并在你的网站上随心所欲地以任何方式显示它。

¥Your Astro project can then fetch your content from your CMS and display it, wherever and however you want on your site.

哪些 CMS 与 Astro 配合良好?

标题部分 哪些 CMS 与 Astro 配合良好?

¥Which CMSes work well with Astro?

由于 Astro 负责内容的渲染,因此你需要选择无头 CMS,如上面列表中的那些。这意味着 CMS 可以帮助你编写内容,但不会生成显示内容的网站。相反,你可以获取内容数据并在 Astro 项目中使用。

¥Because Astro takes care of the presentation of your content, you’ll want to choose a headless CMS, like those in the list above. This means that the CMS helps you write your content, but doesn’t generate a site that displays it. Instead, you fetch the content data and use in your Astro project.

一些无头 CMS(例如 Storyblok)提供 Astro integration,可帮助专门为 Astro 站点获取内容。其他人提供 JavaScript SDK,你安装并使用它来获取远程内容的库。

¥Some headless CMSes, like Storyblok, provide an Astro integration that helps fetch the content specifically for an Astro site. Others provide a JavaScript SDK, a library that you install and use to fetch your remote content.

Explore a list of over 100 headless content management systems External where you can filter by type (e.g. Git-based, API driven) and license (open-source or closed-source).

我可以在没有 CMS 的情况下使用 Astro 吗?

标题部分 我可以在没有 CMS 的情况下使用 Astro 吗?

¥Can I use Astro without a CMS?

是的!Astro 提供对 Markdown 的内置支持。

¥Yes! Astro provides built-in support for Markdown.

Astro 中文网 - 粤ICP备13048890号