diff --git a/Rules b/Rules index 3f2e75b..2b3040d 100644 --- a/Rules +++ b/Rules @@ -1,5 +1,9 @@ #!/usr/bin/env ruby +compile '/' do + layout 'listing' +end + compile '*' do filter :rdiscount layout 'default' diff --git a/config.yaml b/config.yaml index 48588b2..90b15b7 100644 --- a/config.yaml +++ b/config.yaml @@ -4,3 +4,4 @@ data_sources: - items_root: / layouts_root: / type: filesystem_compact +base_url: http://wezm.net \ No newline at end of file diff --git a/layouts/default.html b/layouts/default.html index 6de57d8..1020a8a 100644 --- a/layouts/default.html +++ b/layouts/default.html @@ -9,23 +9,11 @@ - + <%= render 'header' %>

<%= @item[:title] %>

<%= yield %>
- + <%= render 'footer' %> diff --git a/layouts/footer.html b/layouts/footer.html new file mode 100644 index 0000000..a4cd958 --- /dev/null +++ b/layouts/footer.html @@ -0,0 +1,3 @@ + diff --git a/layouts/footer.yaml b/layouts/footer.yaml new file mode 100644 index 0000000..20670d5 --- /dev/null +++ b/layouts/footer.yaml @@ -0,0 +1,2 @@ +--- {} + diff --git a/layouts/header.html b/layouts/header.html new file mode 100644 index 0000000..16ad63f --- /dev/null +++ b/layouts/header.html @@ -0,0 +1,11 @@ + diff --git a/layouts/header.yaml b/layouts/header.yaml new file mode 100644 index 0000000..20670d5 --- /dev/null +++ b/layouts/header.yaml @@ -0,0 +1,2 @@ +--- {} + diff --git a/layouts/listing.html b/layouts/listing.html new file mode 100644 index 0000000..53b0753 --- /dev/null +++ b/layouts/listing.html @@ -0,0 +1,20 @@ + + + + + <%= @item[:title] %> + + + + + + <%= render 'header' %> +
+ <% sorted_articles.each do |article| %> +

<%= article.title %>

+ <% end %> +
+ <%= render 'footer' %> + + diff --git a/layouts/listing.yaml b/layouts/listing.yaml new file mode 100644 index 0000000..20670d5 --- /dev/null +++ b/layouts/listing.yaml @@ -0,0 +1,2 @@ +--- {} + diff --git a/lib/default.rb b/lib/default.rb index a4df0cc..df666ab 100644 --- a/lib/default.rb +++ b/lib/default.rb @@ -1,2 +1,4 @@ # All files in the 'lib' directory will be loaded # before nanoc starts compiling. +include Nanoc3::Helpers::Rendering +include Nanoc3::Helpers::Blogging \ No newline at end of file