- Added a
--disable-bindings
flag to the@bookshop/generate
command.- This skips initializing the data panel overlays when live editing, which can significantly improve performance for complex sites.
- Updated Bookshop's internal Hugo version from
v0.111.3
tov0.136.1
. - Updated all Bookshop dependencies to clear all
npm audit
warnings. - Bookshop now forwards Hugo logs to the browser console if an error occurs when rendering in the Visual Editor.
- Added support for ENV_BOOKSHOP_LIVE in Typescript files for Bookshop Astro
- Bookshop Astro Features & Fixes
- Add support for GIF, TIFF and AVIF image imports (PR #197 — thanks @oliverlynch !)
- Bookshop Astro Features & Fixes
- Adds component error boundaries to the Astro engine.
- Adds support for client rendered components inside Bookshop components.
- Astro Bookshop will now attempt to load build plugins from your integrations.
- Fixes an issue where the asset URLs generated by Astro Bookshop during live editing were wrong.
- Fixes an issue where Astro Dynamic tags would break live editing.
- Fixes some inconsistencies in content collections between Bookshop and Astro.
- Fixes some inconsistencies in the
Image
component between Bookshop and Astro. - Fixes an issue where component names containing dashes would break MDX auto-imports.
- Fixes an issue where React TSX components would fail to parse.
- Fixes an issue where scripts in Astro components would be run multiple times when live editing.
- Fixes an issue where the Astro engine was too lenient when checking bookshop names.
- Adds support for the
astro:content
andastro:assets
modules inside Bookshop components. - Adds support for the
<slot/>
component and theAstro.slots
global inside Bookshop components. - Astro Bookshop will now use your configured Vite plugins when building components.
- Fixes an error in Astro Bookshop, when spreading a prop that is possibly undefined.
- Fixes the Bookshop browser failing to load for Astro sites.
- Astro Bookshop will now detect component folders within subfolders of the Astro
src
folders.
- Fixes an error when loading Bookshop's dependencies through CloudCannon's client editing interface
- Added support for extraFiles that can be passed to Bookshop's Hugo engine, allowing custom shortcodes and partials to be used
- See the Hugo extra files guide for interim documentation
- Added support for Sass and CSS imports in Astro components
- Fixed an error when bundling an Astro component with no props
- Fixed support for React components when using Astro 3
- Fixed support for scoped CSS when using Astro 3
- Fixed an inconsistency in CSS class name generation
- Fixed an issue with live rendering a component with multiple Front Matter props in Astro
- Fixed Astro databindings for components with multiple Front Matter props with no common prefix
- Fixed an edge case generating structures for component names that end with the word
components
- Fixed
ENV_BOOKSHOP_LIVE
flag being undefined when live editing Astro components
- Improved memory performance when live editing
- (Temporarily) Pin an exact
sass
version to workaround sass/dart-sass#1995
- Improved error handling for Astro Bookshop sites.
- Fixed a bug which could cause incorrect component data-bindings for Astro sites.
- Fixed Bookshop metadata not being correctly removed from Astro components in some cases.
This release introduces experimental support for Astro Bookshop sites 🙌
We're also transitioning away from the current (intimidating) reference guides in this repository, so all of the details on Astro Bookshop can be found in the new Bookshop Astro Guide on the CloudCannon documentation.
- Improved live editing performance for Eleventy and Jekyll sites
- Fixes a performance regression when live editing Hugo with many literal assignments
- Since 3.4.0 literal assignments such as
{{ $var := "string" }}
caused a significant performance hit. This has now been resolved
- Since 3.4.0 literal assignments such as
This release adds component error boundaries to the Hugo, Jekyll, and Eleventy live editing engines.
Now when syntax errors or unsupported SSG features are used, the individual component should render an error on the page, and the surrounding components will continue to render correctly. This only applies to the CloudCannon live editing environment, and does not impact your production website build.
Fixed an error where nested object arrays in a component blueprint would error out.
blueprint:
title: Hello World
nested:
# `nested` would be made into an array structure with a value matching the below object
- title: "Nested Object #1"
double_nested:
# This would not work and `double_nested` would default to a string array
- title: "Nested Object #2"
This release fixes this behaviour, and deeply nested object arrays will behave as expected.
The main aspect of this release is a new and improved Hugo renderer when live editing on CloudCannon. Alongside being more reliable, this unlocks many templating functions that were previously unavailable, such as:
newScratch
absURL
highlight
humanize
Additionally, functions that would previously cause a full error (such as resources.Get
) will now return nil
, and as such can be handled gracefully inside a component.
Looking forward, this release also paves the path for supporting site actions like site.GetPage
in the visual editor, as well as using custom non-Bookshop Hugo partials in the visual editor.
As with all releases, your repository can be upgraded to the latest Bookshop by running:
npx @bookshop/up@latest
- Hugo WebAssembly files are now preloaded in CloudCannon, so loading the visual editor should be significantly faster
- Improved data binding support for Hugo template files, and generally fixed many issues with complex templating
- Reduced noise in the developer console when live editing Hugo Bookshop sites
- Added a
markdownify
filter to Eleventy Bookshop
- Fixes a
v3.1.1
error when running the@bookshop/browser
command for Hugo
- Fix nested component keys in SvelteKit websites (@NJKode — #125)
- Stopped loading Hugo WebAssembly files from
cdn.bookshop.build
- These are instead compressed and served from the site alongside Bookshop assets
- General repository tidyups and release automation, in preparation for a larger Hugo Bookshop release
- Component Initialization
- Component blueprints referencing nested components can now initialize those components on creation with the
!
operator. SeeInitializing Nested Components
in the relevant guide.
- Component blueprints referencing nested components can now initialize those components on creation with the
- SvelteKit Beta Support
- Bookshop now supports SvelteKit, with live editing provided by the existing CloudCannon Svelte Connector.
- See the newly created SvelteKit Guide to get started.
- Fixed some console errors when live editing in Hugo
- Improved the initialization speed of Hugo live editing
3.1.3 (2022-06-17)
- eleventy collection loops no longer crash (84a64c4)
- The forloop.name feature implemented in liquidjs has now made it to Eleventy, so the Bookshop workaround has been removed. This workaround was previously causing a crash when nested inside a collection loop.
- default @bookshop/init to new component if a bookshop dir was found (12ad117)
- Previously, running @bookshop/init would prompt you for the decision between creating a new component or a new Bookshop every time. Now, if it find a Bookshop directory it will default to the new component decision.
3.1.2 (2022-05-10)
- set input configuration on generated structures within blueprints (ed0d6b3)
- Previously, an array of objects within a component would not use a field configured in the
_inputs
block of the component. Any_
cascade fields are now set on all generated sub-structures in a component.
- Previously, an array of objects within a component would not use a field configured in the
3.1.1 (2022-05-04)
- move the Hugo live environment flag to site.Params (0d6b0c8)
- Flag has been moved to
site.Params.env_bookshop_live
: Hugo docs
- Flag has been moved to
3.1.0 (2022-05-04)
- components can determine whether they are being live edited (c9b9b45)
3.0.1 (2022-04-12)
-
add
_bookshop_name
keys to structures in the component browser (513cb32) -
override nested components with preview in the component browser (7b3ab9b)
-
support adding multiple nested components in the component browser (0ad843e)
3.0.0 (2022-04-07)
-
Bookshop has a new component configuration syntax. See the Bookshop 3.0 migration guide for in-depth information
- The new configuration files allow for your inputs to be configured using CloudCannon's
_inputs
configuration
- The new configuration files allow for your inputs to be configured using CloudCannon's
-
Your component blueprint can now nest other components and structures (c1dd5f2)
-
eleventy: Site data and collections are now available to your templates while live editing (df009c4)
- For data to be accessible, you will need to expose each data set using
data_config
in your CloudCannon Global Configuration file.
- For data to be accessible, you will need to expose each data set using
-
hugo:
site.Data
is now available to your templates while live editing (cac0fd3)- For data to be accessible, you will need to set
data_config: true
in your CloudCannon Global Configuration file.
- For data to be accessible, you will need to set
-
hugo: Site string functions are now available to your templates while live editing (a71e1ea)
- This encompasses the common configuration variables
site.Title
,site.BaseURL
, andsite.Copyright
- This encompasses the common configuration variables
-
Embedding the Component Browser is now easier across all SSGs (1226d01)
- Using the
{% bookshop_component_browser %}
or{{ partial "bookshop_component_browser" }}
is now all that is needed. - This will handle both local browsing of the component library, and building a hosted component library.
- Using the
-
Bookshop will now set a CMS loading state while live editing is initializing (5b65707)
- This is especially helpful for first loads on Hugo sites, while loading the live editing WebAssembly
-
The bookshop/init command can now create new Bookshop projects (824de51)
- Running
npx @bookshop/init --new <name>
will scaffold out a new Bookshop for you
- Running
-
The new
npx @bookshop/up@latest
command can upgrade all Bookshop dependencies. (6ffe599)- This will also migrate old config files to the new syntax, and can convert between different file formats.
-
npx @bookshop/init
can now generate all supported file formats (4ab5276) -
eleventy: The
url
filter is now available to your templates while live editing (bd44ae0)- This requires that a
pathPrefix
is passed toeleventy-bookshop
in your.eleventy.js
.
- This requires that a
-
jekyll: The
relative_url
filter is now available to your templates while live editing (79304cc) -
Bookshop will now log a console error when your live editing package versions don't match the Bookshop plugin version your site was built with (798e7ed)
-
eleventy: Bookshop live editing no longer crashes when passing recursive data structures to components (98610b4)
-
jekyll/eleventy: Variables using complex filters with arguments now render correctly (d87797c)
-
jekyll/eleventy: Variable assignments that span multiple lines now render correctly (d87797c)
-
browser: The component browser now loads in safari (10eb05f)
-
hugo: Nested component paths (like
sections/hero
) are now correctly resolved when live editing (5fab912) -
hugo: Ranging over a map now works correctly when live editing (46a0d51)
-
hugo: Loading a hosted Bookshop Component Library now loads the WebAssembly correctly (0d8cc82)
-
hugo: Live editing in Hugo now loads the WebAssembly from a cdn correctly (e9b9aaf)
-
Bookshop config files now have a different structure. See the Bookshop 3.0 migration guide for more information.
-
eleventy/jekyll: Eleventy and Jekyll sites will need to change from the
{% bookshop_browser <PORT> %}
tag to the{% bookshop_component_browser %}
tag. The new tag requires no arguments. -
eleventy: The
@bookshop/cloudcannon-eleventy-bookshop
plugin is now superseded by the bookshop/generate npm package. See the Bookshop 3.0 migration guide for more information. -
jekyll: The
cloudcannon-jekyll-bookshop
plugin is now superseded by the bookshop/generate npm package. See the Bookshop 3.0 migration guide for more information. -
jekyll: For data to be accessible when live editing, you will need to set
data_config: true
in yourcloudcannon.config.*
file. -
jekyll: Some collection fields such as page.content and page.excerpt are no longer available when live editing.
-
jekyll: Data and collections are no longer accessible from the component browser.
2.6.1 (2022-03-03)
- eleventy: fixes live rendering of string arguments (1e5b979)
- jekyll/eleventy: multiline assign tags now render correctly (2756be2)
- jekyll: fail markdownify gracefully if the input is undefined (3238f8d)
2.6.0 (2022-02-25)
- bookshop tags can now be broken up onto multiple lines in all ssgs (9ea3462)
- bookshop tags can now be called without props in all ssgs (3e370e8)
- browser: prevent compression of the bookshop browser javascript (ba132d9)
- hugo: components passed params directly would not get a binding (77ec44b)
- hugo: hugo partials passed only a string would error in live editor (8ae7e67)
- hugo: improve complex templating support in the live editor (5706627)
- hugo: iterating over a map now works correctly when live editing (408573f)
- hugo: reduce errors when using assigned variables in components (e6a85c2)
- live: downgrade data binding errors to console warnings (66e9dfe)
- generate: add flags to skip default steps (8660328)
- live: opt-out of live rendering with the live_render flag in props (939be4c)
- live: improve performance by throttling renders (c34e2d4)
2.5.0 (2022-02-22)
- hugo: bundle hugo correctly when running local component browser (089dcf3)
- match hugo's (bizzare) handling of short markdown strings (f14261f)
- add component browser setup to
bookshop/generate
's toolkit (70cbab9)- As mentioned in the Hugo Guide
- browser: bookshop/browser can now be called without arguments (dd13a13)
- See the Component Browser guide
2.4.2 (2022-02-02)
- hugo-engine: implement many transforms for hugo live editing (98024f8)
-
Now supported:
markdownify
plainify
emojify
htmlEscape
htmlUnescape
- *
highlight
-
markdownify
uses a different implementation than hugo, so the output is not guaranteed to be identical. -
*
highlight
is not supported, but will no longer error. It will now pass through the input unchanged.
-
- jekyll-engine: implement markdownify for jekyll live editing (53af90d)
markdownify
uses a different kramdown implementation than jekyll, so the output is not guaranteed to be identical.
2.4.1 (2022-02-01)
- attempt to load the hugo wasm from a cdn where possible (8423acb)
2.4.0 (2022-01-31)
- fix complex assignments and loops that were breaking live editing in Jekyll and Eleventy
- fix initial render of data bindings on Jekyll sites that load external data
- improved resolution of complex data bindings
- Hugo Bookshop support 🎉
- Hugo live editing beta 🎉
- Hugo component browser beta 🎉
- new method of updating the page when live editing — image flickering should be greatly reduced
- new @bookshop/generate command for structures and live editing — Jekyll and Eleventy documentation to come
2.3.1 (2022-01-19)
- live rendering error boundary around bad comments (91e77f1)
2.3.0 (2022-01-19)
- generate: add new structures cli to replace cc-ssg plugins (8a4bff3)
2.2.3 (2021-12-14)
2.2.2 (2021-12-08)
- support
_editor_link
and_editorLink
as flags in component data (1fa8591)
2.2.1 (2021-12-07)
- handle some editor link corner cases (a45653a)
- editor links can be toggled on a per-component basis by setting the
editor_links
oreditorLinks
flag in a components props
2.2.0 (2021-12-05)
- live: automatically add cms editor links in the live renderer (08fa8b3)
This will take effect with the upcoming CloudCannon editor panels release.
2.1.1 (2021-11-16)
- init: fix arguments to @bookshop/init command (c15282d)
2.1.0 (2021-11-16)
- eleventy: make eleventy engine more lenient for dynamic components (f6de1f0)
- eleventy: eleventy 1.0.0-beta support (35fce81)
- hugo: core hugo component support (#60) (75a9765)
- init: renamed the @bookshop/gen package to @bookshop/init (86ad798)
2.0.10 (2021-10-29)
- no-op release to reset npm latest tag
2.0.9 (2021-10-13)
- eleventy-bookshop: correctly handle nested liquidjs contexts (c4899f7)
- toml-narrator: fix quotes in TOML comments (50992f2)
2.0.8 (2021-10-12)
- live: wrong injected window variable (d226bcd)
2.0.7 (2021-10-11)
- jekyll-engine: correct jekyll highlight tag implementation (020d8c2)
- live: handle more live editing edge cases (9ee51c0)
2.0.6 (2021-10-08)
- normalize paths for fast-glob on windows (d37e9ed)
- use patched node-runner while awaiting next publish (d98a91b)
2.0.5 (2021-10-06)
- automatically set the array structure id_key for components (e9a1650)
2.0.4 (2021-10-06)
- live rendering name parsing edge cases (f7badef)
2.0.3 (2021-10-05)
- retry components that error in jekyll due to a thread race (1cc3172)
2.0.2 (2021-10-05)
- Fix incorrect live rendering behavior for @bookshop/live
2.0.1 (2021-10-05)
- Provide an optional hosted component library outside of the website when running npx @bookshop/live
- Introduced npx @bookshop/gen command
- Initial stable release for Jekyll and Eleventy