jekyll-wikilinks 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll-wikilinks.rb +1 -1
- data/lib/jekyll-wikilinks/doc_manager.rb +2 -2
- data/lib/jekyll-wikilinks/parser.rb +3 -2
- data/lib/jekyll-wikilinks/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f6d8e47bdeb17eba9c47c70c35ed2622fe27ab4b6280fa1838d6c69f24723b9
|
4
|
+
data.tar.gz: bfb12748858bd1c810b5613e1c2f516e64d65772082a680e24b3c796f37b6e80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e6483f4844cc0b0d8fd43be71040bce438b5357972e2139660ca1979a2b42843af2355577a46dc0f119902e281fb244b4fc53d8db7f8a3760889073be08db36
|
7
|
+
data.tar.gz: 0af4216fa1fae8dbc086e785663d5ab4884afe83924c3b8fe5ef0ccb98fffa508dfc767b9c057b1dfec17efba36e3202eb494751ac53731209130c2108e43454
|
data/lib/jekyll-wikilinks.rb
CHANGED
@@ -150,7 +150,7 @@ module JekyllWikiLinks
|
|
150
150
|
label: doc.data['title'],
|
151
151
|
}
|
152
152
|
# TODO: this link calculation ends up with duplicates -- re-visit this later.
|
153
|
-
all_links = doc.data['
|
153
|
+
all_links = doc.data['attributed'] + doc.data['backlinks']
|
154
154
|
all_links.each do |link|
|
155
155
|
linked_doc = link['doc']
|
156
156
|
if !excluded_in_graph?(linked_doc.type)
|
@@ -42,10 +42,10 @@ module JekyllWikiLinks
|
|
42
42
|
return nil
|
43
43
|
end
|
44
44
|
|
45
|
-
# 'bname' -> 'basename' (filename with
|
45
|
+
# 'bname' -> 'basename' (filename with)
|
46
46
|
def get_image_by_bname(filename)
|
47
47
|
return nil if filename.nil? || @static_files.size == 0 || !SUPPORTED_IMG_FORMATS.any?{ |ext| ext == File.extname(filename).downcase }
|
48
|
-
docs = @static_files.select{ |d| d.
|
48
|
+
docs = @static_files.select{ |d| File.basename(d.relative_path) == filename }
|
49
49
|
return nil if docs.nil? || docs.size > 1
|
50
50
|
return docs[0]
|
51
51
|
end
|
@@ -120,7 +120,8 @@ module JekyllWikiLinks
|
|
120
120
|
lnk_doc_rel_url
|
121
121
|
) if wikilink.embedded?
|
122
122
|
elsif (link_lvl == "header" && DocManager.doc_has_header?(linked_doc, wikilink.header_txt))
|
123
|
-
|
123
|
+
# from: https://github.com/jekyll/jekyll/blob/6855200ebda6c0e33f487da69e4e02ec3d8286b7/Rakefile#L74
|
124
|
+
lnk_doc_rel_url += "\#" + Jekyll::Utils.slugify(wikilink.header_txt)
|
124
125
|
wikilink_inner_txt = "#{fname_inner_txt} > #{wikilink.header_txt}" if wikilink_inner_txt.nil?
|
125
126
|
elsif (link_lvl == "block" && DocManager.doc_has_block_id?(linked_doc, wikilink.block_id))
|
126
127
|
lnk_doc_rel_url += "\#" + wikilink.block_id.downcase
|
@@ -134,7 +135,7 @@ module JekyllWikiLinks
|
|
134
135
|
end
|
135
136
|
end
|
136
137
|
end
|
137
|
-
|
138
|
+
|
138
139
|
# the wikilink class knows everything about the original markdown syntax and its semantic meaning
|
139
140
|
class WikiLink
|
140
141
|
attr_accessor :embed, :link_type, :filename, :header_txt, :block_id, :label_txt
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-wikilinks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- manunamz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|