I am trying to embed the contents of a simplified Daily Note into a single page. The goal here is have a running log of the notes I make in daily notes over the past 7 days.
I would like to include only the portion of each daily note from the first ‘#’ block and then have a link back to each note near each note’s embedded content (so I can jump back there if needed).
(I know there are some plugins that can concatenate notes like this, but I’m hoping to have this as a Dataview block, so I can place it into other pages with some different criteria. I don’t want a plugin that makes it all appear on its own page.)
Things I have tried
I have this bit of dataviewjs that works very closely to what I want:
Well, I guess posing it as a question here got my brain organized around how to solve this query. Here is my current solution:
DataviewJS block is now this:
const pages = dv.pages('"01-Daily Notes"') // all pages within the "01-Daily Notes" folder hierachy
.where(p => p.tag.includes("daily-note")) // include only those notes that have the tag 'daily-note'
.sort(p => moment(p.created), 'desc') // Sort by creation date in descending order
.slice(0, 5); // Take the top 5 most recent pages - change to 10 for more
pages.forEach(page => {
dv.el("p", "![[" + page.file.name + "]]"); // create the embedded note link for each of the returned pages, up to the number we slice at above
});
And then this is the Daily Note Templater template:
This will create a note that has a link back to itself in the first heading.
And add this CSS Snippet to remove the inline file name from the Dataview embedded note block (note - it does not hide that title from normal embeds - remove the .block-language-dataviewjs part to remove across whole vault):