Commit 3a3810ed by Alex Gil

cleaned up the former relative method

parent e258b056
......@@ -385,9 +385,12 @@ will attempt to read the key `ruby` from file `/home/foo/bar.bib`. It will not
fallback to the default BibTeX file.
#### Citation pointing to another page in your site
In some cases, you might want your citation to link to another page on your cite (ex. a separate works cited page). As a solution, Jekyll-Scholar provides the `--relative` tag. For example, if you wanted the link to point to an ID in a bibliography.html page, you would use:
In some cases, you might want your citation to link to another page on your cite (ex. a separate works cited page). As a solution, add a relative path to your scholar configurations:
{% cite ruby --relative bibliography.html %}
~~~ yaml
scholar:
relative: "/relative/path/file.html"
~~~
#### Multiple bibliographies within one document (like [multibib.sty](http://www.ctan.org/pkg/multibib))
......
......@@ -18,7 +18,7 @@ module Jekyll
module Utilities
attr_reader :config, :site, :context, :prefix, :text, :offset, :max, :relative
attr_reader :config, :site, :context, :prefix, :text, :offset, :max
......@@ -61,10 +61,6 @@ module Jekyll
@prefix = prefix
end
opts.on('-r', '--relative RELATIVE') do |relative|
@relative = relative.to_s.strip
end
opts.on('-t', '--text TEXT') do |text|
@text = text
end
......@@ -90,7 +86,7 @@ module Jekyll
end
end
argv = arguments.split(/(\B-[cCfqrptTslomA]|\B--(?:cited(_in_order)?|file|query|relative|prefix|text|style|template|locator|offset|max|suppress_author|))/)
argv = arguments.split(/(\B-[cCfqptTslomA]|\B--(?:cited(_in_order)?|file|query|prefix|text|style|template|locator|offset|max|suppress_author|))/)
parser.parse argv.map(&:strip).reject(&:empty?)
end
......@@ -382,7 +378,7 @@ module Jekyll
#elotroalex
def relative
@relative || config['relative']
config['relative']
end
def reference_tag(entry, index = nil)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment