const current = dv.current();
if (current && current.file.tags.some(t => t.toLowerCase() === "#topic")) {
const inlinks = current.file.inlinks;
// Split backlinks: general notes vs. lecture notes
const lectureLinks = inlinks.where(l => l.path.includes("/Lecture Notes/"));
const otherLinks = inlinks.where(l => !l.path.includes("/Lecture Notes/"));
if (otherLinks.length > 0) {
dv.header(4, "Links To This Page");
dv.list(otherLinks);
}
if (lectureLinks.length > 0) {
dv.header(4, "Referenced In Lecture Notes");
dv.list(lectureLinks);
}
}