index stuff

This commit is contained in:
Lorin Werthen 2016-06-09 16:08:43 +02:00
parent 27b53da67b
commit 9339cf5a75
4 changed files with 64 additions and 23 deletions

17
Rules
View file

@ -1,8 +1,15 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
# HTML # HTML
# compile '/**/*.html' do
# layout '/default.*'
# end
compile '/**/*.html' do compile '/**/*.html' do
layout '/default.*' end
compile '/**/*.erb' do
filter :erb
end end
# Markdown # Markdown
@ -11,12 +18,12 @@ compile '/**/*.md' do
layout '/default.*' layout '/default.*'
end end
route '/**/*.{html,md}' do route '/index.erb' do
if item.identifier =~ '/index.*'
'/index.html' '/index.html'
else
"#{item.identifier.without_ext}/index.html"
end end
route '/**/*.{html,md}' do
"#{item.identifier.without_ext}/index.html"
end end
compile '/**/*' do compile '/**/*' do

44
content/index.erb Normal file

File diff suppressed because one or more lines are too long

View file

@ -1,14 +0,0 @@
---
title: Home
---
<h1>A Brand New Nanoc Site</h1>
<p>Youve just created a new Nanoc site. The page you are looking at right now is the home page for your site. To get started, consider replacing this default homepage with your own customized homepage. Some pointers on how to do so:</p>
<ul>
<li><p><strong>Change this pages content</strong> by editing the “index.html” file in the “content” directory. This is the actual page content, and therefore doesnt include the header, sidebar or style information (those are part of the layout).</p></li>
<li><p><strong>Change the layout</strong>, which is the “default.html” file in the “layouts” directory, and create something unique (and hopefully less bland).</p></li>
</ul>
<p>If you need any help with customizing your Nanoc web site, be sure to check out the documentation (see sidebar), and be sure to subscribe to the discussion group (also see sidebar). Enjoy!</p>

View file

@ -5,13 +5,17 @@
<title>A Brand New Nanoc Site - <%= @item[:title] %></title> <title>A Brand New Nanoc Site - <%= @item[:title] %></title>
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/pure-min.css"> <link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/pure-min.css">
<link rel="stylesheet" href="/stylesheet.css"> <link rel="stylesheet" href="/stylesheet.css">
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/grids-responsive-old-ie-min.css">
<![endif]-->
<!--[if gt IE 8]><!-->
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/grids-responsive-min.css">
<!--<![endif]-->
<!-- you don't need to keep this, but it's cool for stats! --> <!-- you don't need to keep this, but it's cool for stats! -->
<meta name="generator" content="Nanoc <%= Nanoc::VERSION %>"> <meta name="generator" content="Nanoc <%= Nanoc::VERSION %>">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head> </head>
<body> <body>
<div id="main">
<%= yield %>
</div>
</body> </body>
</html> </html>