atomized notes

[[concept]]

Topics

const fieldName = "theme"; // Your field with links
const oldPrefix = "Thoughts/01 Themes/";
const newPrefix = "Digital Garden/Topics/";
 
const relatedLinks = dv.current()[fieldName];
 
if (Array.isArray(relatedLinks)) {
    // Map over the links, replace the path, and output only clickable links
    dv.el("span",
        relatedLinks
            .map(link => {
                if (link && link.path) {
                    let newPath = link.path.startsWith(oldPrefix)
                        ? link.path.replace(oldPrefix, newPrefix)
                        : link.path;
                    return dv.fileLink(newPath);
                }
            })
            .filter(Boolean).join(", ") 
	// Remove any undefined/null items
    );
} else {
    dv.el(dv.current().theme);
}
 
 

Atomized notes capture single ideas. They are clear and concise and are used in many popular systems of navigating thoughts and managing knowledge

When used in a private garden, they

  • are very useful for studying
  • make it easier to distill thoughts
  • can be combined to form new ideas

References

References

See Also

Mentions

Mentions

const modules = await cJS()
 
const COLUMNS = [  
	{ id: "Name", value: page => page.$link },  
	{ id: "Last Modified", value: page => modules.dateTime.getLastMod(page) },
];  
  
return function View() {  
	const current = dc.useCurrentFile();
// Selecting `#game` pages, for example. 
	let queryString = `@page and linksto(${current.$link})`;
	let pages = dc.useQuery(queryString);
	
	// check types
	pages = pages.filter( (p) => !modules.typeCheck.checkAll(p, current) ).sort()
	
	
	return <dc.Table columns={COLUMNS} rows={pages} paging={20}/>;  
}  
return function View() {
	const file = dc.useCurrentFile();
	const created = file.value("created");
	const modified = file.value("modified")
	
	let earliest;
	if (created) {
		earliest = moment(created.toString()).isBefore(moment(file.$ctime))
		? created.toString()
		: file.$ctime;
		} else {
		earliest = file.$ctime
	}
	
	let latest = (Array.isArray(modified) && modified.length > 0)
		? modified[-1]
		: file.$mtime;
	
	let earlyString = moment(earliest).format("YYYY-MM-DD");
	let lateString = moment(latest).format("YYYY-MM-DD")
	return <p class="dv-modified">Created {earlyString}     ֍     Last Modified {lateString}</p>
}