### Eleventy Bookshop Package Installation
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/eleventy.adoc
Installs the necessary npm package for integrating Bookshop with Eleventy. Use either npm or yarn for installation.
```bash
# npm
npm i --save-exact @bookshop/eleventy-bookshop
# or yarn
yarn add --exact @bookshop/eleventy-bookshop
```
--------------------------------
### SvelteKit Bookshop Package Installation
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/eleventy.adoc
Installs the necessary npm package for integrating Bookshop with SvelteKit. Use either npm or yarn for installation.
```bash
# npm
npm i --save-exact @bookshop/sveltekit-bookshop
# or yarn
yarn add --exact @bookshop/sveltekit-bookshop
```
--------------------------------
### SvelteKit Bookshop Package Installation
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/sveltekit.adoc
Installs the necessary npm package for integrating Bookshop with SvelteKit. Use either npm or yarn for installation.
```bash
# npm
npm i --save-exact @bookshop/sveltekit-bookshop
# or yarn
yarn add --exact @bookshop/sveltekit-bookshop
```
--------------------------------
### Eleventy Bookshop Package Installation
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/sveltekit.adoc
Installs the necessary npm package for integrating Bookshop with Eleventy. Use either npm or yarn for installation.
```bash
# npm
npm i --save-exact @bookshop/eleventy-bookshop
# or yarn
yarn add --exact @bookshop/eleventy-bookshop
```
--------------------------------
### Eleventy Package Installation
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/hugo.adoc
Installs the `@bookshop/eleventy-bookshop` npm package, which is the core dependency for integrating Bookshop with Eleventy projects.
```bash
# npm
npm i --save-exact @bookshop/eleventy-bookshop
# or yarn
yarn add --exact @bookshop/eleventy-bookshop
```
--------------------------------
### SvelteKit Package Installation
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/hugo.adoc
Installs the `@bookshop/sveltekit-bookshop` npm package, which is the primary dependency for integrating Bookshop with SvelteKit applications.
```bash
# npm
npm i --save-exact @bookshop/sveltekit-bookshop
```
--------------------------------
### Component Preview Configuration
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/sveltekit.adoc
Provides example data to display in the component browser, merging with the blueprint for a richer preview. This helps editors visualize the component with sample content.
```yaml
preview:
text: Vestibulum id ligula porta felis euismod semper.
```
--------------------------------
### Eleventy: Install and Use Bookshop Sass
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/eleventy.adoc
Instructions for Eleventy users on how to install the `@bookshop/sass` package and use the provided `bookshop-sass` command to manage Bookshop styles.
```bash
npm i -D @bookshop/sass
# or
yarn add -D @bookshop/sass
```
--------------------------------
### Component Preview Configuration
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/eleventy.adoc
Provides example data to display in the component browser, merging with the blueprint for a richer preview. This helps editors visualize the component with sample content.
```yaml
preview:
text: Vestibulum id ligula porta felis euismod semper.
```
--------------------------------
### Eleventy: Install and Use Bookshop Sass
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/sveltekit.adoc
Instructions for Eleventy users on how to install the `@bookshop/sass` package and use the provided `bookshop-sass` command to manage Bookshop styles.
```bash
npm i -D @bookshop/sass
# or
yarn add -D @bookshop/sass
```
--------------------------------
### Basic Button Component Template
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/eleventy.adoc
Example of a basic button component template, showing how to define link text and URL using different SSG syntaxes.
```liquid
{{ .link_text }}
```
```liquid
{{ include.link_text }}
```
```liquid
{{ link_text }}
```
```svelte
{ link_text }
```
--------------------------------
### Basic Button Component Template
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/sveltekit.adoc
Example of a basic button component template, showing how to define link text and URL using different SSG syntaxes.
```liquid
{{ .link_text }}
```
```liquid
{{ include.link_text }}
```
```liquid
{{ link_text }}
```
```svelte
{ link_text }
```
--------------------------------
### Component Preview Configuration
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/jekyll.adoc
Provides example data to display in the component browser, merging with the blueprint for a richer preview. This helps editors visualize the component with sample content.
```yaml
preview:
text: Vestibulum id ligula porta felis euismod semper.
```
--------------------------------
### Sample Component Definition
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/eleventy.adoc
A YAML file defining a Bookshop component, including its front matter and structure. This example shows a 'sample' component.
```yaml
---
params:
name: "Sample"
---
{% include "sample.bookshop.yml" %}
```
--------------------------------
### Component Preview Configuration
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/hugo.adoc
Provides example data to display in the component browser, merging with the blueprint for a richer preview. This helps editors visualize the component with sample content.
```yaml
preview:
text: Vestibulum id ligula porta felis euismod semper.
```
--------------------------------
### Install Bookshop Packages
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/eleventy.adoc
Installs the necessary Bookshop packages for your SSG project using yarn. It's recommended to use exact versions for consistency.
```shell
yarn add --exact @bookshop/generate @bookshop/browser @bookshop/{ssgeng}-engine
```
--------------------------------
### Bookshop Generate Command Setup
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/migration.adoc
Configuration for the Bookshop Generate command in a CloudCannon postbuild script. This command automates live editing and component browser setup.
```bash
npm i
npx @bookshop/generate
```
--------------------------------
### Install Bookshop Packages
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/sveltekit.adoc
Installs the necessary Bookshop packages for your SSG project using yarn. It's recommended to use exact versions for consistency.
```shell
yarn add --exact @bookshop/generate @bookshop/browser @bookshop/{ssgeng}-engine
```
--------------------------------
### Hugo Bookshop Component Binding Example
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/sveltekit.adoc
This example shows how to use Hugo's templating to pass data from frontmatter (`.Params.hero_text`) to Bookshop components. It illustrates the correct way to bind data for live editing and contrasts it with an incorrect approach that lacks context, which would cause errors in the visual editor.
```go
{{ partial "bookshop_bindings" `(dict "text" .Params.hero_text)` }}
{{ partial "bookshop" (slice "hero" (dict "text" .Params.hero_text)) }}
{{ my_title := .Params.hero_text }}
{{ partial "bookshop_bindings" `(dict text $my_title)` }}
{{ partial "bookshop" (slice "hero" (dict "text" $my_title)) }}
```
--------------------------------
### Eleventy: Install and Use Bookshop Sass
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/hugo.adoc
Instructions for Eleventy users on how to install the `@bookshop/sass` package and use the provided `bookshop-sass` command to manage Bookshop styles.
```bash
npm i -D @bookshop/sass
# or
yarn add -D @bookshop/sass
```
--------------------------------
### Basic Button Component Template
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/hugo.adoc
Example of a basic button component template, showing how to define link text and URL using different SSG syntaxes.
```liquid
{{ .link_text }}
```
```liquid
{{ include.link_text }}
```
```liquid
{{ link_text }}
```
```svelte
{ link_text }
```
--------------------------------
### Basic Button Component Template
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/jekyll.adoc
Example of a basic button component template, showing how to define link text and URL using different SSG syntaxes.
```liquid
{{ .link_text }}
```
```liquid
{{ include.link_text }}
```
```liquid
{{ link_text }}
```
```svelte
{ link_text }
```
--------------------------------
### Initialize Bookshop Project
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/eleventy.adoc
Command to create a new Bookshop component library for a specified framework. It sets up the necessary directory structure and configuration files.
```bash
npx @bookshop/init --new component-library --framework {ssgeng}
```
--------------------------------
### Jekyll Bookshop Starter Template Link
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/jekyll.adoc
A direct link to a starter template repository on GitHub, allowing users to quickly clone and begin working with a pre-configured Jekyll Bookshop project.
```url
https://github.com/CloudCannon/jekyll-bookshop-starter/
```
--------------------------------
### SvelteKit Package Installation
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/jekyll.adoc
Installs the `@bookshop/sveltekit-bookshop` npm package, which is the primary dependency for integrating Bookshop with SvelteKit applications.
```bash
# npm
npm i --save-exact @bookshop/sveltekit-bookshop
```
--------------------------------
### Initialize Bookshop Component Library
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/sveltekit.adoc
Command to create a new Bookshop component library structure for a specified framework. This sets up the necessary directories and configuration files.
```bash
npx @bookshop/init --new component-library --framework svelte
```
--------------------------------
### Initialize Bookshop Project
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/hugo.adoc
Command to create a new Bookshop component library for a specified framework. It sets up the necessary directory structure and configuration files.
```bash
npx @bookshop/init --new component-library --framework hugo
```
--------------------------------
### Eleventy Package Installation
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/jekyll.adoc
Installs the `@bookshop/eleventy-bookshop` npm package, which is the core dependency for integrating Bookshop with Eleventy projects.
```bash
# npm
npm i --save-exact @bookshop/eleventy-bookshop
# or yarn
yarn add --exact @bookshop/eleventy-bookshop
```
--------------------------------
### Hugo Front Matter Example
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/eleventy.adoc
Example of Hugo front matter in YAML format, defining component data and structure for rendering.
```yaml
sample:
text: Hello World
```
```yaml
sample:
_bookshop_name: sample
text: Hello World
```
```yaml
content_blocks:
- _bookshop_name: hero
hero_text: Hello World
image: /image.png
- _bookshop_name: cta
heading: Join our newsletter
location: /signup
```
```yaml
content_blocks:
- _bookshop_name: sample
text: A sample example
```
--------------------------------
### Install Bookshop npm Packages (Bash)
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/eleventy.adoc
Installs the essential Bookshop npm packages required for developer tooling, such as data generation and live editing capabilities. These packages are typically installed at the root of your repository.
```bash
npm i --save-exact @bookshop/generate @bookshop/browser @bookshop/{ssgeng}-engine
```
--------------------------------
### Install Bookshop npm Packages (Bash)
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/sveltekit.adoc
Installs the essential Bookshop npm packages required for developer tooling, such as data generation and live editing capabilities. These packages are typically installed at the root of your repository.
```bash
npm i --save-exact @bookshop/generate @bookshop/browser @bookshop/{ssgeng}-engine
```
--------------------------------
### Initialize New Bookshop Component
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/sveltekit.adoc
Command to create a new component within an existing Bookshop project. The component will be initialized with a schema file.
```bash
npx @bookshop/init --component
```
--------------------------------
### Install Bookshop npm Packages (Bash)
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/jekyll.adoc
Installs the essential Bookshop npm packages required for developer tooling, such as data generation and live editing capabilities. These packages are typically installed at the root of your repository.
```bash
npm i --save-exact @bookshop/generate @bookshop/browser @bookshop/{ssgeng}-engine
```
--------------------------------
### Bookshop Component Browser Help Command
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/sveltekit.adoc
Command to display help and available options for the Bookshop component browser CLI.
```bash
npx @bookshop/browser --help
```
--------------------------------
### Install Bookshop npm Packages (Bash)
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/hugo.adoc
Installs the essential Bookshop npm packages required for developer tooling, such as data generation and live editing capabilities. These packages are typically installed at the root of your repository.
```bash
npm i --save-exact @bookshop/generate @bookshop/browser @bookshop/{ssgeng}-engine
```
--------------------------------
### Initialize New Bookshop Component
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/eleventy.adoc
Command to create a new component within an existing Bookshop project. The component will be initialized with a schema file.
```bash
npx @bookshop/init --component
```
--------------------------------
### CloudCannon Postbuild Script
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/hugo.adoc
Configures a `.cloudcannon/postbuild` script to install dependencies and run the `@bookshop/generate` command. This script automatically discovers component libraries and site outputs to generate CloudCannon Structures and connect live editing.
```bash
npm i
npx @bookshop/generate
```
--------------------------------
### Hugo Front Matter Example
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/sveltekit.adoc
Example of Hugo front matter in YAML format, defining component data and structure for rendering.
```yaml
sample:
text: Hello World
```
```yaml
sample:
_bookshop_name: sample
text: Hello World
```
```yaml
content_blocks:
- _bookshop_name: hero
hero_text: Hello World
image: /image.png
- _bookshop_name: cta
heading: Join our newsletter
location: /signup
```
```yaml
content_blocks:
- _bookshop_name: sample
text: A sample example
```
--------------------------------
### Hugo Front Matter Example
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/jekyll.adoc
Example of Hugo front matter in YAML format, defining component data and structure for rendering.
```yaml
sample:
text: Hello World
```
```yaml
sample:
_bookshop_name: sample
text: Hello World
```
```yaml
content_blocks:
- _bookshop_name: hero
hero_text: Hello World
image: /image.png
- _bookshop_name: cta
heading: Join our newsletter
location: /signup
```
```yaml
content_blocks:
- _bookshop_name: sample
text: A sample example
```
--------------------------------
### Bookshop Component Browser Help Command
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/eleventy.adoc
Command to display help and available options for the Bookshop component browser CLI.
```bash
npx @bookshop/browser --help
```
--------------------------------
### Hugo Front Matter Example
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/hugo.adoc
Example of Hugo front matter in YAML format, defining component data and structure for rendering.
```yaml
sample:
text: Hello World
```
```yaml
sample:
_bookshop_name: sample
text: Hello World
```
```yaml
content_blocks:
- _bookshop_name: hero
hero_text: Hello World
image: /image.png
- _bookshop_name: cta
heading: Join our newsletter
location: /signup
```
```yaml
content_blocks:
- _bookshop_name: sample
text: A sample example
```
--------------------------------
### Hugo Front Matter Example
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/hugo.adoc
Example of front matter configuration in a Hugo markdown file, defining a 'hero_text' variable for use in components.
```yaml
---
hero_text: "Hello World"
---
```
--------------------------------
### Render Bookshop Component with Hugo Partial
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/eleventy.adoc
Demonstrates the basic Hugo syntax for rendering a Bookshop component using the `bookshop` partial. It shows how to pass component data as a slice containing the component name and its arguments.
```go
{{ partial "bookshop" (slice "sample" .Params.sample) }}
```
--------------------------------
### Hugo Live Editing Bindings with Custom Data
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/sveltekit.adoc
Shows an advanced Hugo template example for live editing, demonstrating how to pass custom data dictionaries to Bookshop components using `bookshop_bindings` and `bookshop_partial`.
```go
{{ partial "bookshop_bindings" `(dict hero_text .Params.hero_text)` }}
{{ partial "bookshop" (slice "hero" (dict hero_text .Params.hero_text)) }}
```
--------------------------------
### Jekyll Bookshop Gem Installation
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/eleventy.adoc
Adds the 'jekyll-bookshop' gem to your project's Gemfile for Jekyll integration. Ensure you run 'bundle install' after adding this.
```ruby
group :jekyll_plugins do
gem "jekyll-bookshop", "{version}"
end
```
--------------------------------
### Initialize Bookshop Component Library
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/jekyll.adoc
Initializes a new Bookshop component library using the `@bookshop/init` CLI command. This command sets up the necessary directory structure and configuration files for a component library, specifying the target framework.
```bash
npx @bookshop/init --new component-library --framework jekyll
```
--------------------------------
### Jekyll Bookshop Gem Installation
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/sveltekit.adoc
Adds the 'jekyll-bookshop' gem to your project's Gemfile for Jekyll integration. Ensure you run 'bundle install' after adding this.
```ruby
group :jekyll_plugins do
gem "jekyll-bookshop", "{version}"
end
```
--------------------------------
### Render Bookshop Component with Hugo Partial
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/sveltekit.adoc
Demonstrates the basic Hugo syntax for rendering a Bookshop component using the `bookshop` partial. It shows how to pass component data as a slice containing the component name and its arguments.
```go
{{ partial "bookshop" (slice "sample" .Params.sample) }}
```
--------------------------------
### Install Bookshop Packages
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/jekyll.adoc
Installs the necessary Bookshop packages for your SSG project using yarn. It's recommended to use exact versions for consistency.
```shell
yarn add --exact @bookshop/generate @bookshop/browser @bookshop/{ssgeng}-engine
```
--------------------------------
### Hugo Live Editing Bindings with Custom Data
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/eleventy.adoc
Shows an advanced Hugo template example for live editing, demonstrating how to pass custom data dictionaries to Bookshop components using `bookshop_bindings` and `bookshop_partial`.
```go
{{ partial "bookshop_bindings" `(dict hero_text .Params.hero_text)` }}
{{ partial "bookshop" (slice "hero" (dict hero_text .Params.hero_text)) }}
```
--------------------------------
### Example Page Front Matter
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/hugo.adoc
An example of front matter for a page that uses Bookshop components, specifically defining `content_blocks` which can be referenced in Hugo layouts.
```yaml
---
content_blocks:
---
```
--------------------------------
### Install Bookshop Packages
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/hugo.adoc
Installs the necessary Bookshop packages for your SSG project using yarn. It's recommended to use exact versions for consistency.
```shell
yarn add --exact @bookshop/generate @bookshop/browser @bookshop/{ssgeng}-engine
```
--------------------------------
### Jekyll Bookshop Integration
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/jekyll.adoc
This section describes how to integrate Bookshop into an existing Jekyll site. It references the official Jekyll installation guide for setting up a new site.
```url
https://jekyllrb.com/docs/
```
--------------------------------
### Eleventy: Install and Use Bookshop Sass
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/jekyll.adoc
Instructions for Eleventy users on how to install the `@bookshop/sass` package and use the provided `bookshop-sass` command to manage Bookshop styles.
```bash
npm i -D @bookshop/sass
# or
yarn add -D @bookshop/sass
```
--------------------------------
### Render Bookshop Component with Hugo Partial
Source: https://github.com/cloudcannon/bookshop/blob/main/guides/hugo.adoc
Demonstrates the basic Hugo syntax for rendering a Bookshop component using the `bookshop` partial. It shows how to pass component data as a slice containing the component name and its arguments.
```go
{{ partial "bookshop" (slice "sample" .Params.sample) }}
```