Setup library
Configure library for blocks, templates, placeholders, media.
Introduction
By setting up a library for blocks, placeholders, media, and more you can help authors find the right content to insert into your documents.
- Create Block Documents - Create individual documents for each block under "blocks" folder , that is available for authors to place in the documents.
- Create Blocks Sheet - Create a sheet called blocks under "library" folder with two columns
nameandpath. The value entered in thenamewill be the displayed in the Library -> Blocks as Block Name .pathvalue is link to block document in the format of https://content.da.live/{org}/{site}/ - Create Template Documents - Create individual documents for each template under "templates" folder . Template documents contain required blocks, section breaks, section metadata and metadata blocks that can be reused while building pages based on this template
- Create Templates Sheet - Create a sheet called templates under "library" folder with two columns
keyandvalue. The value entered in thekeywill be the displayed in the Library -> Templates .valuecontains the link to the template document in the format of https://content.da.live/{org}/{site}/ - Create Icons Sheet - Identify the locations of the icons that authors can add to the documents. Create a sheet called icons under "library" folder with three columns
keyandvalueandiconThe text entered in thevaluewill be the displayed in the Library -> Icons with a button to add it to the document the is currently open .iconcontains the link to the icon. The text entered inkeymust be in the format::as that is going to be added to the document - Create Placeholders Sheet - Refer to Placeholders documentation to set up placeholders as per the project requirements.
- Create Library Configuration Sheet- In this step create config sheet for your site by using an url like https://da.live/sheet#/
{org}/{site}/.da/config by replacing the{org}and{site}values of the project
Create Block Documents
Each block may contain variations of two different types.
visual variant where the block header will have variant-name in () followed by block name . e.g: table(striped)
All the variants of a block will be displayed as individual items under Block name as shown below. In this case Table blocks visual variants are displayed as individual items under "Table" block
content variants . When the block can have multiple types of content ( e.g: cards block that can have images or just text).
When creating the Block document , you can add a heading for each variant so that they will be listed as sub items for the Blocks
Library Metadata for Blocks (optional)
In the block documents created earlier, each block can be accompanied by a Library Metadata table. This table should include a Description field that briefly outlines the purpose and functionality of the block. The Library Metadata table must be inserted after the block it describes itself. It also can be replicated for all blocks and their respective variants.
Once added, the blocks listed in the Block Library will display an information ("info") icon next to the block or variant name. Clicking this icon reveals the description provided in the metadata table, allowing authors to:
- Quickly understand the purpose of each block and its variants.
- Easily identify the most suitable block variant for their use case.
- Improve overall efficiency in block selection and implementation.
Creating Blocks Sheet
Create a sheet with two columns name and path. The value entered in the name will be the displayed in the Library -> Blocks as Block Name .
path value is link to block document in the format of https://content.da.live/{org}/{site}/
Block options
You can specify pipe delimited key / value pairs that provide your authors with values if the key column and block name match. Note: if you spec a name=colorValue you can show a swatch of color to your authors. Below you can see a sample.
| key | blocks | values |
| style | section-metadata | xxs-spacing | xs-spacing | x-spacing |
| background | section-metadata | dark-grey=#676767 | light-grey=#EFEFEF | adobe-red=#FF0000 | blue=#0077B6 | green=#00A36C | express-gradient=linear-gradient(90deg, rgba(63,94,251,1) 0%, rgba(252,70,107,1) 100%) |
Create Template Documents
Create individual documents for each content template. The templates generally contain a full page with required blocks , section-metadata , metadata blocks. The intent is , When user adds the template to the currently opened document , the entire contents of the template will be placed in to the document
Create Templates Sheet
Create a sheet with two columns key and value. The value entered in the key will be the displayed in the Library > Templates as Template Name .
value value is link to block document in the format of https://content.da.live/{org}/{site}/
Create Icons Sheet
Create a sheet with two columns key and value. The value entered in the key will be the displayed in the Library > Icons as Icon Name .
value value is link to block document in the format of https://content.da.live/{org}/{site}/
Create Library Configuration Sheet
Before creating the configuration sheet , please validate that the necessary documents and sheets are available , preview and publish all of them.
The library folder structure should look like:
Now, proceed to https://da.live/config#/{org}/{site}/ replacing the {org} and {site} values of the project. You will want to create a new sheet tab called "library" to store all the references to your library lists above. Make sure you keep the "data" tab in the sheet as well.
Config sheet
Library tab
| title | path | format | ref | icon | experience |
| Blocks | https://path-to-blocks.json | ||||
| Templates | https://path-to-templates.json | ||||
| Placeholders | https://path-to-placeholders.json | {{ | |||
| Icons | https://path-to-icons.json | : | |||
| Rollout | https://path-to-plugin.html | https://path-to-plugin.png | dialog |
Note: the last line of the above table is for a library plugin. The `.html` for the path and the `.png` for the icon are intentional.
Validating Library Setup
Open any document in the site , expand the Library from the sidekick and verify following
- Blocks , Template , Icons and Placeholders are appearing
- Expand each group and validate whether individual items under each group( block, template, icon or placeholder) can be aded to the document
Setup apps
Library tab
| title | description | image | path | ref |
| My report suite | Run content reports | https://path-to-plugin.png | https://da.live/app/{{ORG}}/{{SITE}}/tools/my-app | |