npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@getkist/action-nunjucks

v2.0.14

Published

Jinja/Nunjucks template rendering actions for kist with single-file and directory mode support

Readme

@getkist/action-nunjucks

npm version npm downloads Node.js version License: MIT Test Status Codecov Coverage

Jinja/Nunjucks template rendering actions for kist.

Features

  • 🎨 Render Nunjucks templates to files
  • Directory mode - batch render entire folders preserving structure
  • 📝 Load context data from YAML/JSON files
  • ⚙️ Configurable Nunjucks behaviors (autoescape, trim, lstrip)
  • 🔤 Custom output encoding support
  • 🚀 Useful for docs sites, static pages, and codegen

Installation

npm install --save-dev @getkist/action-nunjucks

Quick Start

Single File Mode

pipeline:
    stages:
        - name: render
          steps:
              - name: render-page
                action: TemplateRenderAction
                options:
                    templatePath: ./templates/page.njk
                    outputPath: ./dist/page.html
                    context:
                        title: "Welcome"

Directory Mode

Render all templates in a directory while preserving folder structure:

pipeline:
    stages:
        - name: render
          steps:
              - name: render-templates
                action: TemplateRenderAction
                options:
                    inputDir: ./src/templates
                    outputDir: ./dist
                    pattern: "**/*.html.jinja"
                    excludePatterns:
                        - "_*.jinja"
                        - "partials/**"
                    stripExtension: ".jinja"
                    context:
                        siteName: "My Site"

This renders:

  • src/templates/index.html.jinjadist/index.html
  • src/templates/about/team.html.jinjadist/about/team.html
  • Skips _base.jinja and partials/ files

Documentation

Actions

TemplateRenderAction

Renders Nunjucks templates with optional context files and Nunjucks configuration.

Single File Mode Options

| Option | Type | Required | Description | |--------|------|----------|-------------| | templatePath | string | Yes | Path to template file | | outputPath | string | Yes | Output file path | | context | object | No | Template context data | | contextFiles | string[] | No | YAML/JSON files to merge | | searchPaths | string[] | No | Template search paths for includes | | autoescape | boolean | No | Enable HTML escaping | | trimBlocks | boolean | No | Trim trailing newlines from blocks | | lstripBlocks | boolean | No | Strip leading whitespace from blocks | | outputEncoding | string | No | File encoding (default: utf8) |

Directory Mode Options

| Option | Type | Required | Description | |--------|------|----------|-------------| | inputDir | string | Yes | Source directory containing templates | | outputDir | string | Yes | Output directory for rendered files | | pattern | string | No | Glob pattern (default: **/*.html.jinja) | | excludePatterns | string[] | No | Patterns to exclude (e.g., partials) | | stripExtension | string | No | Extension to remove (default: .jinja) | | context | object | No | Shared context for all templates | | contextFiles | string[] | No | YAML/JSON files to merge | | searchPaths | string[] | No | Template search paths for includes | | autoescape | boolean | No | Enable HTML escaping | | trimBlocks | boolean | No | Trim trailing newlines from blocks | | lstripBlocks | boolean | No | Strip leading whitespace from blocks | | outputEncoding | string | No | File encoding (default: utf8) |

Development

npm run build        # Compile TypeScript
npm run test         # Run tests
npm run lint         # Check code quality
npm run docs         # Generate API documentation
npm run format       # Format code with Prettier

Requirements

  • Node.js >= 20.0.0
  • npm >= 10.0.0

License

MIT