Filter pages

To filter pages under a specific condition

Options See on

extensions string[] *

The list of extensions this plugin applies to

fn function

The function to test the page

(page) => true


This plugin allows to filter the pages of your site using a callback.


The plugin requires a function that receives the Page instance as the first argument and must return a boolean. If it returns false, the page will be discarded. For example, to remove all pages with the property ignored=true:

import lume from "lume/mod.ts";
import filterPages from "lume/plugins/filter_pages.ts";

const site = lume();

  fn: (page) => !== true,

export default site;