aem-block-library
Installation
SKILL.md
Block Library Entry
Find the project's library first
- Existing pages. Look in
./content/for the library pages of other blocks./docs/library/blocks/<block>is the most common location. Put the new page next to them. - Experience Workspace (DA): a
blockssheet in the library folder lists the blocks, and the site config athttps://da.live/config#/{org}/{site}/has alibrarytab that points to it. - Sidekick Library (Word, Google Docs):
tools/sidekick/library.htmlin the repo, and alibraryworkbook with ahelix-blockssheet. The page loader needs no change for a new block.
What an entry contains
- Happy path only: each variant once, with realistic content, including an image if the block has one (a placeholder source is fine). Edge cases (missing cells, long text, no image) never go in the library. Cover them in unit tests or on a drafts page such as
content/drafts/. - A
library-metadatablock with adescriptionrow that says when to use the block. - Add only the page and the sheet row. No other files.
Experience Workspace (DA)
- One page per block under the library folder. A visual variant goes in the block's heading row in parentheses (
testimonial (dark)) and becomes a class. Content variants (same markup, different content) get a heading above the block. - Add a row to the
blockssheet:name, andpathashttps://content.da.live/{org}/{site}/{path of the new page}, in the format of the existing rows (the page is in the folder the existing block pages are in). - The
librarytab of the site config needs a row (title,path= the sheet's.jsonURL). It exists already if other blocks show up; check and don't duplicate it. It lives outside the repo.