Improve the internal link detection in the link generator

This commit is contained in:
2026-08-09 16:30:06 -04:00
parent 8aa7a1c7af
commit a70453cf0f
2 changed files with 2 additions and 2 deletions

View File

@@ -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.

View File

@@ -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