Blogs > Adding Metadata in Edge Delivery Services

AEM EDS

Adding Metadata in Edge Delivery Services

Infodales Tech Solutions | December 20, 2024

Happy to find you here. Welcome to another learning.

What is Metadata?

metadata refers to the information embedded in a webpage or associated with its content that describes its characteristics, purpose, and other properties. Metadata is not typically visible to users but plays a crucial role in how search engines, browsers, and other systems interpret and interact with the webpage.

Metadata to the page can be added in two ways

  1. Using Block- use to add `page level metadata.

  2. Using Google sheet or excel- this is for site level or used for bulk metadata.

Using Block

To add metadata in page we need to add block to the page called metadata block it is a special block that is handled by HTML rendering service internally to add"meta tags in head of HTML structure.

There should be only one metadata block per page and it should be placed at the bottom of the page we can keep it anywhere but should be kept at the bottom of the page. Below image shows how we need to create the block

metadata-block

In the above image as we can see i have added title, description, image, template, color, theme and robots. If you wont add title then it will pick the first h1 of page similarly for the description it will pick the first paragraph.After adding the block we need to preview the page and you can see that it is added in meta tag section in the below image.

metadata-added

This is how we add metadata using block

Using Excel Sheet

When we wanted to add metadata for particular hierarchy/pages under particular folder or we wanted to add metadata in bulk then in that case we use excel sheet to add metadata.

Steps to add metadata using excel

  • So, to add the metadata using google sheet of excel we need to create a excel file with name metadata under the root folder meaning under the main folder where all the project files are kept.

  • metadata-sheet-name
  • Inside the file we need to create a column called URL where we will define on which hierarchy metadata should be applied. And other columns will be the meta tags that you wanted to apply and their values.

  • metadata-excel-properties
  • If ** then it will apply on all the pages and if you want to apply those meta tags only the pages which is under some folder for e.g. /cms/ then you need to define as shown above in the image.

  • Note: Now if you have applied any meta tag let say "Theme" using metadata block and also applied using google sheet then in that case metadata block will be given priority.

    bulk-metadata-added

As you can see the metadata properties have been added to the pages

Thanks for reading 😄


Owais Pathan | AEM Developer
LinkedIn Email