mirror of
https://github.com/moparisthebest/android.moparisthebest.org
synced 2024-10-31 23:35:00 -04:00
include_code now defaults to relative urls for easy testing on a development server
This commit is contained in:
parent
6db1a5ada5
commit
3ea1e4edab
@ -58,7 +58,7 @@ module Jekyll
|
|||||||
code = file.read
|
code = file.read
|
||||||
@filetype = file.extname.sub('.','') if @filetype.nil?
|
@filetype = file.extname.sub('.','') if @filetype.nil?
|
||||||
title = @title ? "#{@title} (#{file.basename})" : file.basename
|
title = @title ? "#{@title} (#{file.basename})" : file.basename
|
||||||
url = "#{context.registers[:site].config['url']}/#{code_dir}/#{@file}"
|
url = "/#{code_dir}/#{@file}"
|
||||||
source = "<div><figure role=code><figcaption><span>#{title}</span> <a href='#{url}'>download</a></figcaption>\n"
|
source = "<div><figure role=code><figcaption><span>#{title}</span> <a href='#{url}'>download</a></figcaption>\n"
|
||||||
source += " #{highlight(code, @filetype)}</figure></div>"
|
source += " #{highlight(code, @filetype)}</figure></div>"
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user