mirror of
https://github.com/danog/sass-site.git
synced 2025-01-22 05:41:42 +01:00
Use a pure-Ruby search/replace for the documentation CSS.
This commit is contained in:
parent
65ca03170f
commit
eb254a8dc9
6
Rakefile
6
Rakefile
@ -44,8 +44,10 @@ task :sass_docs => :sass do
|
||||
Dir.chdir(".sass") {bundle %{exec rake doc}}
|
||||
sh %{rm -rf source/documentation}
|
||||
sh %{cp -r .sass/doc source/documentation}
|
||||
sh %{find source/documentation -name '*.html' } +
|
||||
%{-exec sed 's/css\\/common\\.css/..\\/assets\\/css\\/docs.css/g' -i {} \\;}
|
||||
Dir['source/documentation/**/*.html'].each do |path|
|
||||
contents = File.read(path)
|
||||
File.open(path, 'w') {|file| file.write(contents.gsub(%r{css/common\.css}, '../assets/css/docs.css'))}
|
||||
end
|
||||
end
|
||||
|
||||
desc "Import information from Sass."
|
||||
|
Loading…
x
Reference in New Issue
Block a user