Author a block
After pushing the teaser block鈥檚 JSON to the teaser
branch, the block becomes editable in the AEM Universal Editor.
Authoring a block in development is important for several reasons:
- It verifies that the block鈥檚 definition and model are accurate.
- It allows developers to review the block鈥檚 semantic HTML, which serves as the foundation for development.
- It enables deployment of both the content and semantic HTML to the preview environment, supporting faster block development.
Open Universal Editor using code from the teaser
branch
-
Log in to AEM Author.
-
Navigate to Sites and select the site (WKND (Universal Editor)) created in the previous chapter.
-
Create or edit a page to add the new block, ensuring the context is available to support local development. While pages can be created anywhere within the site, it鈥檚 often best to create discrete pages for each new body of work. Create a new 鈥渇older鈥 page named Branches. Each sub-page is used to support the development of the same-named Git branch.
-
Under the Branches page, create a new page titled Teaser, matching the development branch name, and click Open to edit the page.
-
Update the Universal Editor to load the code from the
teaser
branch by adding?ref=teaser
to the URL. Make sure to add the query parameter BEFORE the#
symbol. -
Select the first section under Main, click the add button, and choose the Teaser block.
-
On the canvas, select the newly added teaser and author the fields on the right, or via the inline editing capability.
-
After completing authoring, select the Publish button in the top right of Universal Editor, choose publish to Preview, and publish the changes to the preview environment. The changes are then published to the
aem.page
domain for the website.
-
Wait for the changes to publish to preview, then open the webpage via the AEM CLI at .
Now, the authored teaser block鈥檚 content and semantic HTML are available on the preview website, ready for development using the AEM CLI in the local development environment.