惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园_首页
C
Check Point Blog
B
Blog RSS Feed
G
Google Developers Blog
H
Help Net Security
博客园 - Franky
Blog — PlanetScale
Blog — PlanetScale
H
Hackread – Cybersecurity News, Data Breaches, AI and More
量子位
Recent Announcements
Recent Announcements
B
Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
D
DataBreaches.Net
小众软件
小众软件
T
The Blog of Author Tim Ferriss
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
MongoDB | Blog
MongoDB | Blog
Y
Y Combinator Blog
T
Tailwind CSS Blog
J
Java Code Geeks
MyScale Blog
MyScale Blog
雷峰网
雷峰网
有赞技术团队
有赞技术团队
博客园 - 聂微东

CloudCannon Blog

Building with AI: Git-based vs headless vs traditional CMS CloudCannon + Astro: performance meets powerful content management Introducing the Astro Component Starter Introducing Jetstream — built on the Astro Component Starter Why we switched to the system font stack Redesigning CloudCannon’s docs with Diátaxis, Lume, and Pagefind Make content editing more visual: upgraded Editable Regions How Configuration Mode makes building editing interfaces easy Your hosting just got an upgrade (and a price cut) Custom testing domains for professional branding Keep your content consistent with input validation Managing multilingual content in CloudCannon Simplify team publishing with conflict resolution and domain tools Open Beta: Publishing Conflict Resolution Welcome to the CloudCannon Community! Omnichannel delivery is just marketing spin from API-based CMS companies Getting started with CloudCannon and Astro: Snippets and Collections Managing digital assets in CloudCannon: a guide to smart asset storage Understanding CloudCannon's branching workflows and Projects: a complete guide What is a static website? CloudCannon’s 2024 wrapped Getting started with CloudCannon and Astro: WYSIWYG blogging Jamstack vs. WordPress: reasons to make the change The top five static site generators for 2025 (and when to use them!) Free Jekyll themes for 2025: ten great community options Eleventy (11ty) vs. Hugo How to set up WYSIWYG editing with MkDocs Material The rise of static-first websites: why major brands are making the switch Watching your Core Web Vitals on Jamstack Understanding the difference between static, dynamic, and hybrid websites
Getting started with CloudCannon and Astro: Bookshop, com...
2025-04-15 · via CloudCannon Blog

In our previous tutorials, we explored how to set up basic blog editing in CloudCannon's Content Editor for an Astro theme. We refactored our Collections, performed some small tidy-ups along the way, and implemented the ability to add components throughout your Markdown body content using CloudCannon’s Snippets feature.

Today, we’re taking the next step in our journey with the BigSpring Light Astro theme by implementing Bookshop for live editing. This powerful tool handles component importing into your page’s body content, and also connects your front matter fields directly to the HTML on your page, enabling real-time visual previews of your changes.

What does Bookshop do? Direct link to this section

Bookshop serves two primary functions in our Astro site:

  1. It automatically handles the importing of components into content pages (replacing the auto-import we were using previously).
  2. It establishes connections between front matter fields and HTML elements, enabling live previewing of changes.

Instead of having to save, rebuild, and refresh to see your changes, Bookshop allows you to preview your modifications instantly in CloudCannon's Visual Editor. For non-developers, this can be a huge efficiency (and confidence) boost when making content changes to a website.

Want to learn more about CloudCannon and Bookshop? Check out CloudCannon’s documentation and the Astro Bookshop Guide for additional resources.

Implementation steps Direct link to this section

Here’s what we covered in this video tutorial:

1. Setting up the foundational structure

  • Recapped the Bookshop setup work we did from the last video, which we used for importing Snippets
  • Updated Bookshop to the latest version
  • Created a shared page helper (in source/shared/astro/page.astro)
  • Created a new page layout for our component-based pages

2. Refactoring components

We methodically worked through our homepage, converting each section into a Bookshop component:

  • Banner
  • Features
  • Services
  • Workflow
  • Call to action

For each component, we:

  • Created the component files (*.astro and *.bookshop.yaml)
  • Extracted the HTML from the original page
  • Moved the relevant front matter into the component structure on the content page
  • Implemented image recipes for responsive images

3. Enhancing the editing experience

To improve the content editing experience in CloudCannon, we:

  • Added icons to components for easier identification
  • Set up blueprints for the initial values each component should have when adding them to a page in CloudCannon
  • Configured appropriate input types for each field (text areas, markdown editors, etc.)
  • Set up global input configurations for common fields like “content” and “button”
  • Created structures for adding complex values (like an object) to type: array inputs

The result Direct link to this section

With these changes implemented, our site now offers a component-based structure that’s easy to maintain and extend, and a significantly improved editing experience with properly configured input fields.

Content editors now have the ability to reorder, add, or remove components through a visual interface, with live previewing of all changes in the CloudCannon Visual Editor.

Next steps Direct link to this section

In our next tutorial, we’ll expand on our work by refactoring the rest of the site’s pages to use our newly created components. We’ll also explore creating new pages with these components, further leveraging the power of Bookshop and CloudCannon.