# Embeding content of the pages in an index page

**URL:** <https://community.silverbullet.md/t/embeding-content-of-the-pages-in-an-index-page/3405>\
**Category:** Tricks & Techniques\
**Created:** [October 16, 2025, 3:07pm UTC](https://community.silverbullet.md/t/embeding-content-of-the-pages-in-an-index-page/3405 "2025-10-16T15:07:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![markalex](https://community.silverbullet.md/user_avatar/community.silverbullet.md/markalex/32/1861_2.png) [@markalex](https://community.silverbullet.md/u/markalex)\
**Post date:** [October 16, 2025, 3:07pm UTC](https://community.silverbullet.md/t/embeding-content-of-the-pages-in-an-index-page/3405/1 "2025-10-16T15:07:18Z")

</div>

I was trying to store venue list in my Silverbullet.  
Idea I have is to store every venue as a separate page with frontmatter handling metadata, like link, addresses, coordinates, and content of the page being notes or reviews.

I had a challenge in including content of the other pages in the main one.  
Here’s my solution to this challenge:

```auto
${template.each(
query[[
  from index.tag "page" 
 where table.includes(tags, "Venue")
 select {
   name = _.name,
   ref = _.ref,
   content = index.extractFrontmatter(space.readPage(name), {
     removeFrontMatterSection = true,
     removeTags = true
   }).text
}]],
template.new [==[- [[${ref}]] ${content}
]==])}

```

This query gets list of pages and puts into field `content` actual text of each page (excluding frontmatter and tags).
