(A brief 1-2 sentence description of the location’s vibe or history.)
[!info]-
const sessions = dv.pages('"Campaign Information/Sessions"') .where(p => { // Handle both single links and lists of links in the 'arc' property const arc = p.arc; if (!arc) return false; if (Array.isArray(arc)) { return arc.some(link => link.path === dv.current().file.path); } return arc.path === dv.current().file.path; }) .sort(p => p.file.name, 'asc');for (let session of sessions) { const file = app.vault.getAbstractFileByPath(session.file.path); const content = await app.vault.read(file); const lines = content.split('\n'); let summaryLines = []; let foundSummary = false; for (let line of lines) { // Look for the start of your specific callout if (line.trim().toLowerCase().includes('[!success]+ saga20 summary')) { foundSummary = true; continue; } // While inside the callout, collect lines starting with '>' if (foundSummary) { if (line.trim().startsWith('>')) { // Clean the '>' off the front of the line summaryLines.push(line.trim().replace(/^>\s?/, "")); } else if (line.trim() === "" && summaryLines.length > 0) { // Keep going if it's just a blank line within the callout summaryLines.push(""); } else if (summaryLines.length > 0) { // Stop when we hit a line that doesn't start with '>' break; } } } if (summaryLines.length > 0) { dv.header(3, session.file.link); dv.paragraph(summaryLines.join('\n')); dv.el("hr", ""); // Adds a horizontal line between session recaps }}
Districts
Areas & Points of Interest
Astrakane
Astrakane
Overview
(A brief 1-2 sentence description of the location’s vibe or history.)