Skip to content

Instantly share code, notes, and snippets.

@biilmann
Created September 23, 2012 15:27
Show Gist options
  • Save biilmann/3772035 to your computer and use it in GitHub Desktop.
Save biilmann/3772035 to your computer and use it in GitHub Desktop.
Navigation extension
exports.sections = function() {
var content = site.content();
if (content.permalink == "/") {
// This is the home page
return null;
} else if (content.parent.permalink == "/") {
// this is a top level section
return content.sections();
} else {
// this is a sub section
return content.parent.sections();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment