-
Notifications
You must be signed in to change notification settings - Fork 2
Sidekick Library
The Sidekick Library serves as an extension for AEM Sidekick, enabling developers to create plugins for content authors. Among its features is a built-in blocks plugin designed to showcase a comprehensive list of available blocks.
In the repository:
- A
library.html
file that implements the sidekick library extension and points to the library spreadsheet. - A
config.json
file that points to the html file.
In Google Drive or Microsoft Sharepoint:
- A
library
spreadsheet, containing paths to block documents listed in a sheet named "helix-blocks". - A
blocks
folder with documents for each block.
To add a block, a document needs to be added to the blocks folder in Google Drive/Sharepoint. Then the block name and path need to be referenced in the library spreadsheet.
The block document contains all variations of a block. Library metadata can be used to give the blocks plugin more information about the block and to differentiate block variations within the library view, for example by adding a name or description to each variation.
The blocks plugin takes the plain html of a block and adds a data-library-id
attribute and a content-editable
attribute to every tag within the html.
If the content-editable
attribute is set to true it is editable (this is the default but can also be changed via metadata).
The data-library-id
attribute is necessary to copy altered content from the Sidekick Library view. Tags lacking this attribute won't permit copied changes; only the original content will be copied.
Certain tags, such as div tags, are considered non-editable and won't receive these attributes.
If markup should be overwritten within the block code, it is necessary to transfer these attributes to the new markup.