View all Quick Notes created today

Context

I'm logging my life in daily journal. Each log starts with a time stamp and follows with several bullets. After a while, I realized I can't cite paragraph (like in Obsidian), so I switched to Quick Note for logging. However, I still want to view all the logs in the journal.

Solution

Thanks to This Post I could achieve what I aim. My solutions contains two parts.

Modify Quick Note Template

I add two entries in frontmatter:

tags: memo
date: ${date.today()}

Modify Journal Template

I added following snippet (tweaked from aforementioned post) to journal template:

${template.each(
query[[
  from index.tag "memo"
  where _.date == editor.getCurrentPageMeta().date 
  select {
   name = _.name,
   ref = _.ref,
   content = index.extractFrontmatter(space.readPage(name), {
     removeFrontMatterSection = true,
     removeTags = true
   }).text
}]],
template.new [==[[[${ref}]] ${content}
]==]) or "_No Thoughts Yet_"}

Bonus Action Button

I added Quick Notes to Top bar to facilite this process. In particular I added

dropdown = false,

to make sure that I have quick access to it on my phone.

Many thanks to the amazing community.

I do something similar with a widget (my notes are tagged with #quick-note rather than #memo). I like the widget method so I can maintain the content from one location. As opposed to yours, this version also shows only the first line of the quick note as a snippet since I'm still using the main Journal page for content.

function markdown.extractSnippet(content)
  content = index.extractFrontmatter(content, {removeFrontMatterSection=true}).text
  return string.split(string.trim(content), "\n")[1]
end

templates.fullPageItemSnippet = template.new[=[- [[${ref}|${ref}]]
  - "${markdown.extractSnippet(space.readPage(ref))}"
]=]

function widgets.linkedQuickNotes(date)
  local notes = query[[from p = index.tag "quick-note" where p.tag == "page" and p.date == date]]
  if some(notes) then
    return widget.markdownBlock("# Linked Quick Notes\n" .. template.each(notes, templates.fullPageItemSnippet))
  end
end

event.listen {
  name = "hooks:renderBottomWidgets",
  run = function(e)
    local page = editor.getCurrentPage()
    local meta = editor.getCurrentPageMeta()
    if not page or not meta then
      return
    end
    if table.includes(meta.tags, "journal") and meta.date then
      return widgets.linkedQuickNotes(meta.date)
    end
  end
}

Thank you for sharing this more evolved version! It's a surprise to me as I'm in need of the snippet function.