Skip to content

Commit

Permalink
Merge pull request #411 from nanoc/fix/stylesheet-href
Browse files Browse the repository at this point in the history
Fix default stylesheet link
  • Loading branch information
denisdefreyne committed Mar 31, 2014
2 parents 3d114e0 + a13bf59 commit b27df93
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/nanoc/cli/commands/create-site.rb
Expand Up @@ -252,7 +252,7 @@ def array_to_yaml(array)
<head>
<meta charset="utf-8">
<title>A Brand New nanoc Site - <%= @item[:title] %></title>
<link rel="stylesheet" href="/style.css">
<link rel="stylesheet" href="<%= @items['/stylesheet/'].path %>">
<!-- you don't need to keep this, but it's cool for stats! -->
<meta name="generator" content="nanoc <%= Nanoc::VERSION %>">
Expand Down
10 changes: 10 additions & 0 deletions test/cli/commands/test_create_site.rb
Expand Up @@ -19,4 +19,14 @@ def test_can_compile_new_site
end
end

def test_new_site_has_correct_stylesheets
Nanoc::CLI.run %w( create_site foo )
FileUtils.cd('foo') do
Nanoc::CLI.run %w( compile )

assert File.file?('content/stylesheet.css')
assert_match(/\/stylesheet.css/, File.read('output/index.html'))
end
end

end

0 comments on commit b27df93

Please sign in to comment.