Tweet

Docs /  templates

Pages

Rendering Pages

Excluding pages

From the YAML Front Matter of a page

You may also exclude files from being rendered by adding published: false to the YAML Front Matter of a page.

---
title: Just testing some stuff on this page, it should not be published
published: false
---

From the Gruntfile

Exclude files from being rendered by prefixing source file patterns with !. Visit the Grunt.js docs to learn more about globbing patterns.

Quoted from the Grunt.js docs
// All files except for bar.js, in alpha order: 
{src: ['foo/*.js', '!foo/bar.js' ], dest: ...}
// All files in alpha order, but with bar.js at the end. 
{src: ['foo/*.js', '!foo/bar.js', 'foo/bar.js' ], dest: ...}

See the template for this page →

Find an error? Let us know →