mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 01:36:13 +00:00
Backend: Upgrade To Jekyll 1.3.0 & Remove Workarounds
* Require in Makefile that everyone use bundle to remove inconsistencies * Require in Gemfile that everyone use Jekyll 1.3.* * Require in Gemfile that everyone use Ruby 2.0.0 (already used by Travis and most developers) * Remove workaround _plugin/svg.rb which showed SVG files in `jekyll serve` (fixed in Jekyll 1.0.0) * Remove inconsistent file path workarounds in _plugins/autocrossref.rb and _plugins/inline-template.rb
This commit is contained in:
parent
a6d5b863bf
commit
ca7b97134d
6 changed files with 11 additions and 28 deletions
|
@ -33,12 +33,10 @@ require 'yaml'
|
|||
def render(context)
|
||||
output = super
|
||||
|
||||
## Workaround for inconsistent relative directory
|
||||
path = File.expand_path(File.dirname(__FILE__)) + "/.."
|
||||
## Load terms from file
|
||||
site = context.registers[:site].config
|
||||
if !site.has_key?("crossref")
|
||||
site['crossref'] = YAML.load_file(path + "/_autocrossref.yaml")
|
||||
site['crossref'] = YAML.load_file("_autocrossref.yaml")
|
||||
end
|
||||
|
||||
## Sort terms by reverse length, so longest matches get linked
|
||||
|
|
|
@ -23,11 +23,8 @@ require 'yaml'
|
|||
def render(context)
|
||||
output = super
|
||||
|
||||
## Workaround for inconsistent relative directory
|
||||
path = File.expand_path(File.dirname(__FILE__)) + "/../"
|
||||
|
||||
data = YAML.load(output)
|
||||
template = File.open(path + @template_name, mode="r")
|
||||
template = File.open(@template_name, mode="r")
|
||||
@mytemplate = Liquid::Template.parse(template.read())
|
||||
@mytemplate.render('entry' => data)
|
||||
end
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
# This file is licensed under the MIT License (MIT) available on
|
||||
# http://opensource.org/licenses/MIT.
|
||||
|
||||
#svg.rb is a workaround to allow built-in jekyll server
|
||||
#to serve svg files with jekyll --server.
|
||||
|
||||
require 'webrick'
|
||||
include WEBrick
|
||||
|
||||
WEBrick::HTTPUtils::DefaultMimeTypes.store 'svg', 'image/svg+xml'
|
Loading…
Add table
Add a link
Reference in a new issue