Skip to content

Instantly share code, notes, and snippets.

@chriszarate
Last active March 24, 2019 23:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chriszarate/a8fae749ba7f487fe0c59cf6df585c8c to your computer and use it in GitHub Desktop.
Save chriszarate/a8fae749ba7f487fe0c59cf6df585c8c to your computer and use it in GitHub Desktop.
$ git add -p src
diff --git a/src/publish.js b/src/publish.js
index 196e8aa..e1fa7df 100644
--- a/src/publish.js
+++ b/src/publish.js
@@ -43,11 +43,10 @@ module.exports = async () => {
// Render aggregation pages.
await publishHtml( 'home', 'index.html', { posts } );
- await publishHtml( 'archive', 'archive', { posts } );
await publishHtml( 'feed', 'feed', { posts }, 'application/atom+xml' );
// Render posts and pages.
- await Promise.all( posts.map( post => publishHtml( 'post', post.slug, { post } ) ) );
+ await Promise.all( posts.map( post => publishHtml( 'post', post.slug, { post, posts } ) ) );
await Promise.all( pages.map( page => publishHtml( 'page', page.slug, { page } ) ) );
// Invalidate the cache.
Stage this hunk [y,n,q,a,d,s,e,?]?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment