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.

  1. Create Block Documents - Create individual documents for each block under "blocks" folder , that is available for authors to place in the documents.
  2. Create Blocks Sheet - Create a sheet called blocks under "library" folder 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}/
  3. 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
  4. Create Templates Sheet - Create a sheet called templates under "library" folder with two columns key and value. The value entered in the key will be the displayed in the Library -> Templates . value contains the link to the template document in the format of https://content.da.live/{org}/{site}/
  5. 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 key and value and icon The text entered in the value will be the displayed in the Library -> Icons with a button to add it to the document the is currently open . icon contains the link to the icon. The text entered in key must be in the format :: as that is going to be added to the document
  6. Create Placeholders Sheet - Refer to Placeholders documentation to set up placeholders as per the project requirements.
  7. 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

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.

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 {{<content>}}
Icons https://path-to-icons.json :<content>:
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