
Product
Introducing Custom Tabs for Org Alerts
Create and share saved alert views with custom tabs on the org alerts page, making it easier for teams to return to consistent, named filter sets.
templates-indexer
Advanced tools
Templates plugin to add index views to template collections.
Install with npm
$ npm i templates-indexer --save
var indexer = require('templates-indexer');
Add addIndices to a templates collection that will add index views to the collection when given an array of pages.
Params
options {Object}options.createView {Function}: Function to create a view object for the index view being added.options.createKey {Function}: Function to create a key for the index view being added.returns {Function}: Function to use as a plugin for templatesExample
var archives = app.create('archives')
.use(indexer())
.addIndices(pages);
addIndices method decorated onto the given collection Iterators over a list of pages (built with list.paginate) and adds each page to the collection as a new index view
Params
pages {Array}: Array of pages return from list.paginatelocals {Object}: Optional locals to add to each index view.opts {Object}: Method options to override plugin options.options.createView {Function}: Function to create a view object for the index view being added.options.createKey {Function}: Function to create a key for the index view being added.returns {Object}: Returns collection to enable chainingExample
collection.addIndices(pages, locals);
Install dev dependencies:
$ npm i -d && npm test
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Brian Woodward
Copyright © 2015 Brian Woodward Released under the MIT license.
This file was generated by verb-cli on September 10, 2015.
FAQs
Templates plugin to add index views to template collections.
We found that templates-indexer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Create and share saved alert views with custom tabs on the org alerts page, making it easier for teams to return to consistent, named filter sets.

Product
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.

Security News
Chrome 144 introduces the Temporal API, a modern approach to date and time handling designed to fix long-standing issues with JavaScript’s Date object.