From a70453cf0f5521a57e23acb0936163537665f059 Mon Sep 17 00:00:00 2001 From: Brendan Chen Date: Sun, 9 Aug 2026 16:30:06 -0400 Subject: [PATCH] Improve the internal link detection in the link generator --- _notes/index.md | 1 - _plugins/bidirectional_links_generator.rb | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/_notes/index.md b/_notes/index.md index 2058b91..fdb3dd3 100644 --- a/_notes/index.md +++ b/_notes/index.md @@ -2,7 +2,6 @@ title: Brendan Chen permalink: / categories: "- '[[Personal website]]'" -layout: default --- I'm Brendan, a recently graduated software engineering student who attended [[Chapman University]]. I'm currently an associate software engineer at Cargill. I'm also the creator of [[OpenAppLock]], an open-source time blocker for iOS, and [[Interchange]], a free shuttle app for Chapman students. diff --git a/_plugins/bidirectional_links_generator.rb b/_plugins/bidirectional_links_generator.rb index affe225..df875d5 100644 --- a/_plugins/bidirectional_links_generator.rb +++ b/_plugins/bidirectional_links_generator.rb @@ -78,7 +78,8 @@ class BidirectionalLinksGenerator < Jekyll::Generator all_notes.each do |current_note| # Nodes: Jekyll notes_linking_to_current_note = all_notes.filter do |e| - e.url != current_note.url && e.content.include?(current_note.url) + # Limit to internal links to avoid including links like the navigation + e.url != current_note.url && e.content.include?("class='internal-link' href='#{current_note.url}'") end # Nodes: Graph