mirror of
https://github.com/moparisthebest/android.moparisthebest.org
synced 2024-12-24 08:28:50 -05:00
Merge branch 'master' into site
This commit is contained in:
commit
84e4979d8b
12
Rakefile
12
Rakefile
@ -128,9 +128,13 @@ end
|
|||||||
desc "Move sass to sass.old, install sass theme updates, replace sass/custom with sass.old/custom"
|
desc "Move sass to sass.old, install sass theme updates, replace sass/custom with sass.old/custom"
|
||||||
task :update_style, :theme do |t, args|
|
task :update_style, :theme do |t, args|
|
||||||
theme = args.theme || 'classic'
|
theme = args.theme || 'classic'
|
||||||
|
if File.directory?("sass.old")
|
||||||
|
puts "removed existing sass.old directory"
|
||||||
|
system "rm -r sass.old"
|
||||||
|
end
|
||||||
system "mv sass sass.old"
|
system "mv sass sass.old"
|
||||||
puts "## Moved styles into sass.old/"
|
puts "## Moved styles into sass.old/"
|
||||||
system "mkdir -p sass; cp -R #{themes_dir}/"+theme+"/sass/* sass/"
|
system "mkdir -p sass; cp -R #{themes_dir}/"+theme+"/sass/ sass/"
|
||||||
cp_r "sass.old/custom/.", "sass/custom"
|
cp_r "sass.old/custom/.", "sass/custom"
|
||||||
puts "## Updated Sass ##"
|
puts "## Updated Sass ##"
|
||||||
end
|
end
|
||||||
@ -138,9 +142,13 @@ end
|
|||||||
desc "Move source to source.old, install source theme updates, replace source/_includes/navigation.html with source.old's navigation"
|
desc "Move source to source.old, install source theme updates, replace source/_includes/navigation.html with source.old's navigation"
|
||||||
task :update_source, :theme do |t, args|
|
task :update_source, :theme do |t, args|
|
||||||
theme = args.theme || 'classic'
|
theme = args.theme || 'classic'
|
||||||
|
if File.directory?("#{source_dir}.old")
|
||||||
|
puts "removed existing #{source_dir}.old directory"
|
||||||
|
system "rm -r #{source_dir}.old"
|
||||||
|
end
|
||||||
system "mv #{source_dir} #{source_dir}.old"
|
system "mv #{source_dir} #{source_dir}.old"
|
||||||
puts "moved #{source_dir} into #{source_dir}.old/"
|
puts "moved #{source_dir} into #{source_dir}.old/"
|
||||||
system "mkdir -p #{source_dir}; cp -R #{themes_dir}/"+theme+"/source/*. #{source_dir}"
|
system "mkdir -p #{source_dir}; cp -R #{themes_dir}/"+theme+"/source/. #{source_dir}"
|
||||||
system "cp -Rn #{source_dir}.old/. #{source_dir}"
|
system "cp -Rn #{source_dir}.old/. #{source_dir}"
|
||||||
system "cp -f #{source_dir}.old/_includes/navigation.html #{source_dir}/_includes/navigation.html"
|
system "cp -f #{source_dir}.old/_includes/navigation.html #{source_dir}/_includes/navigation.html"
|
||||||
puts "## Updated #{source_dir} ##"
|
puts "## Updated #{source_dir} ##"
|
||||||
|
@ -75,6 +75,7 @@ module Jekyll
|
|||||||
code = super.join
|
code = super.join
|
||||||
source = "<div><figure role=code>"
|
source = "<div><figure role=code>"
|
||||||
source += @caption if @caption
|
source += @caption if @caption
|
||||||
|
source = context['pygments_prefix'] + source if context['pygments_prefix']
|
||||||
if @filetype
|
if @filetype
|
||||||
@filetype = 'objc' if @filetype == 'm'
|
@filetype = 'objc' if @filetype == 'm'
|
||||||
@filetype = 'perl' if @filetype == 'pl'
|
@filetype = 'perl' if @filetype == 'pl'
|
||||||
@ -82,6 +83,7 @@ module Jekyll
|
|||||||
else
|
else
|
||||||
source += "<pre><code>" + code.lstrip.rstrip.gsub(/</,'<') + "</code></pre></figure></div>"
|
source += "<pre><code>" + code.lstrip.rstrip.gsub(/</,'<') + "</code></pre></figure></div>"
|
||||||
end
|
end
|
||||||
|
source = source + context['pygments_suffix'] if context['pygments_suffix']
|
||||||
partial = Liquid::Template.parse(source)
|
partial = Liquid::Template.parse(source)
|
||||||
context.stack do
|
context.stack do
|
||||||
partial.render(context)
|
partial.render(context)
|
||||||
|
Loading…
Reference in New Issue
Block a user