From 92828d9199514eb78bd48d564cfe792d48e8a130 Mon Sep 17 00:00:00 2001 From: Lorin Werthen Date: Tue, 26 Jul 2016 20:08:42 +0200 Subject: [PATCH] add atom feed --- Gemfile | 4 ++-- Gemfile.lock | 2 ++ Rules | 6 ++++++ content/feed.erb | 1 + layouts/generic.erb | 2 +- nanoc.yaml | 8 ++++++-- 6 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 content/feed.erb diff --git a/Gemfile b/Gemfile index 2119c19..af0876d 100644 --- a/Gemfile +++ b/Gemfile @@ -1,14 +1,14 @@ # frozen_string_literal: true -# A sample Gemfile source 'https://rubygems.org' -# gem 'nanoc', git: 'https://github.com/werthen/nanoc.git', branch: 'add-resources-to-ilinks-check' gem 'nanoc', '4.2.4' gem 'kramdown' gem 'coffee-script' # Needed for relativize_urls gem 'nokogiri' gem 'sass' +# Needed for atom_feed in blogging helper +gem 'builder' # Checks gem 'w3c_validators' diff --git a/Gemfile.lock b/Gemfile.lock index 7e27d69..6c70245 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,6 +3,7 @@ GEM specs: adsf (1.2.1) rack (>= 1.0.0) + builder (3.2.2) coderay (1.1.1) coffee-script (2.4.1) coffee-script-source @@ -75,6 +76,7 @@ PLATFORMS DEPENDENCIES adsf + builder coffee-script guard-nanoc kramdown diff --git a/Rules b/Rules index f8cd188..ba42946 100644 --- a/Rules +++ b/Rules @@ -39,6 +39,9 @@ end # COMPILATION # # +compile '/feed.*' do + filter :erb +end # # CAMMIE @@ -114,6 +117,9 @@ passthrough '/assets/images/*.{png}' # # +route '/feed.*' do + '/feed.xml' +end # # HOMEPAGE # diff --git a/content/feed.erb b/content/feed.erb new file mode 100644 index 0000000..acc0a7c --- /dev/null +++ b/content/feed.erb @@ -0,0 +1 @@ +<%= atom_feed %> diff --git a/layouts/generic.erb b/layouts/generic.erb index a312454..ac45ae9 100644 --- a/layouts/generic.erb +++ b/layouts/generic.erb @@ -13,7 +13,7 @@ - + diff --git a/nanoc.yaml b/nanoc.yaml index 8e684cd..d28929b 100644 --- a/nanoc.yaml +++ b/nanoc.yaml @@ -1,5 +1,9 @@ -#base_url: https://zeus.ugent.be/beta -base_url: http://localhost:3000 +title: Zeus WPI +# Needed for atom_feed +author_name: '' +author_uri: '' + +base_url: https://zeus.ugent.be/beta # The syntax to use for patterns in the Rules file. Can be either `"glob"` # (default) or `"legacy"`. The former will enable glob patterns, which behave