diff --git a/public/recipes/blog-rss-feed.md b/public/recipes/blog-rss-feed.md index bd2949d..7df51f1 100644 --- a/public/recipes/blog-rss-feed.md +++ b/public/recipes/blog-rss-feed.md @@ -22,11 +22,11 @@ Harp permits [flexible metadata](/docs/development/metadata), so your data might { "my-first-post": { "title": "My post title", - "date": "2013-01-01" + "date": "2013-01-01 PDT" }, "my-second-post": { "title": "My second post", - "date": "2013-02-02" + "date": "2013-02-02 PDT" } } ``` @@ -95,9 +95,9 @@ Create a new file named `feed.xml.ejs` and copy/paste the snippet below: <%- post.title %> ]]> - <%- Date(post.date) %> - <%- url %>/blog/<%- post %> - <%- url %>/blog/<%- post %> + <%- new Date(post.date) %> + <%- url %>/blog/<%- slug %> + <%- url %>/blog/<%- slug %> <% } %> @@ -116,4 +116,4 @@ If you’re using a [Layout](/docs/development/layout) `_layout.jade` file, it w ## How does it work? -By iterating over the metadata in your `_data.json` file, you can create this RSS template just as you might create a list of your posts on a blog index page. By using [variables that you store in your `harp.json` file](/docs/development/globals), you can make sure that if anything changes, it will be easy to update everywhere at once. \ No newline at end of file +By iterating over the metadata in your `_data.json` file, you can create this RSS template just as you might create a list of your posts on a blog index page. By using [variables that you store in your `harp.json` file](/docs/development/globals), you can make sure that if anything changes, it will be easy to update everywhere at once. diff --git a/public/recipes/google-analytics.md b/public/recipes/google-analytics.md index 22ba251..7e07b20 100644 --- a/public/recipes/google-analytics.md +++ b/public/recipes/google-analytics.md @@ -26,7 +26,7 @@ if service.analytics ga('send', 'pageview'); ``` -Then, set the values in _harp.json or harp.json: +Then, set the values under the `globals` variable in _harp.json (or harp.json) file in the root of your project: ```json "service": { @@ -38,7 +38,7 @@ Then, set the values in _harp.json or harp.json: First, create a partial to include Google's embed code. -_shared/analytics.jade +_shared/analytics.ejs ```ejs <% if(service && service.analytics) { %>