Browse Source

Page one pagination should link to "/" not "/?p=1"

pm2
Luke Childs 8 years ago
parent
commit
b7227271f1
  1. 6
      lib/nunjucks-filters.js

6
lib/nunjucks-filters.js

@ -50,8 +50,12 @@ const filters = {
query.p--;
}
// Don't add p var if it's page 1
query.p == 1 && delete query.p
// Encode query string
return `/?${querystring.encode(query)}`;
const queryString = querystring.encode(query);
return queryString ? `/?${queryString}` : '/';
},
name: node => node.nickname
|| node.fingerprint && node.fingerprint.slice(0, 8)

Loading…
Cancel
Save