diff options
| author | Marin Ivanov <[email protected]> | 2013-04-05 18:10:02 +0300 |
|---|---|---|
| committer | Marin Ivanov <[email protected]> | 2013-04-05 18:10:02 +0300 |
| commit | 5061f60b3f096f6f83a1ba27a5b2606430ae1453 (patch) | |
| tree | 8fa71a8b97573add0c1df1f6bdd54cdfc0d35dd9 | |
| parent | ab8673039d8e7e7f68b1a6a8339b98f1fa98d0c3 (diff) | |
Fixed method to check for title in post/page data
| -rw-r--r-- | wikilinks.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/wikilinks.rb b/wikilinks.rb index 7b13c61..e8f9cad 100644 --- a/wikilinks.rb +++ b/wikilinks.rb @@ -17,8 +17,8 @@ module Jekyll def title if @title.nil? - if not @match.nil? && @match.data.has?('title') - @match.data['title'] + if not @match.nil? + match_title else @name end @@ -26,6 +26,12 @@ module Jekyll @title end end + + def match_title + if not @match.data.nil? and @match.data.include? 'title' + @match.data['title'] + end + end def url @match.url |
