diff --git a/_plugins/bidirectional_links_generator.rb b/_plugins/bidirectional_links_generator.rb index 1efa1eb..90fe62a 100644 --- a/_plugins/bidirectional_links_generator.rb +++ b/_plugins/bidirectional_links_generator.rb @@ -24,28 +24,28 @@ class BidirectionalLinksGenerator < Jekyll::Generator # [[A note about cats|this is a link to the note about cats]] current_note.content = current_note.content.gsub( /\[\[#{title_from_filename}\|(.+?)(?=\])\]\]/i, - "\\1" + "\\1" ) # Replace double-bracketed links with label using note filename # [[cats|this is a link to the note about cats]] current_note.content = current_note.content.gsub( /\[\[#{note_potentially_linked_to.data['title']}\|(.+?)(?=\])\]\]/i, - "\\1" + "\\1" ) # Replace double-bracketed links using note title # [[a note about cats]] current_note.content = current_note.content.gsub( /\[\[(#{note_potentially_linked_to.data['title']})\]\]/i, - "\\1" + "\\1" ) # Replace double-bracketed links using note filename # [[cats]] current_note.content = current_note.content.gsub( /\[\[(#{title_from_filename})\]\]/i, - "\\1" + "\\1" ) end @@ -73,7 +73,7 @@ class BidirectionalLinksGenerator < Jekyll::Generator # Nodes: Graph graph_nodes << { id: note_id_from_note(current_note), - path: "#{current_note.url}#{link_extension}", + path: "#{site.baseurl}#{current_note.url}#{link_extension}", label: current_note.data['title'], } unless current_note.path.include?('_notes/index.html')