Improve the internal link detection in the link generator
This commit is contained in:
@@ -2,7 +2,6 @@
|
|||||||
title: Brendan Chen
|
title: Brendan Chen
|
||||||
permalink: /
|
permalink: /
|
||||||
categories: "- '[[Personal website]]'"
|
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.
|
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.
|
||||||
|
|||||||
@@ -78,7 +78,8 @@ class BidirectionalLinksGenerator < Jekyll::Generator
|
|||||||
all_notes.each do |current_note|
|
all_notes.each do |current_note|
|
||||||
# Nodes: Jekyll
|
# Nodes: Jekyll
|
||||||
notes_linking_to_current_note = all_notes.filter do |e|
|
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
|
end
|
||||||
|
|
||||||
# Nodes: Graph
|
# Nodes: Graph
|
||||||
|
|||||||
Reference in New Issue
Block a user