5.0.0 • Published 2 years ago

@static-pages/twig-writer v5.0.0

Weekly downloads
-
License
MPL-2.0
Repository
github
Last release
2 years ago

Static Pages / Twig File Writer

Renders page data via twig templates into files.

Merges the @static-pages/file-writer and @static-pages/twig-renderer packages together for convenience.

This package is part of the StaticPagesJs project, see:

Usage

import twigWriter from '@static-pages/twig-writer';

const writer = twigWriter({
	outDir: 'dist',
	outFile: d => d.urlPrefix + d.url,
	viewsDir: 'myViews',
	view: 'content.twig',
});

const pageData = { title: 'Page header', body: 'My Content' };

writer({ value: pageData }); // writes the rendered page to the disk as a file.

Options

The available options are an union of the file-writer options and the twig-renderer options.

5.0.0

2 years ago

4.0.1

3 years ago

4.0.0

3 years ago

4.0.2

3 years ago

3.0.3

3 years ago

3.0.2

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago

2.0.0

3 years ago

0.3.0

3 years ago

0.2.0

3 years ago

0.1.0

3 years ago