1.14.0 • Published 3 months ago

@jungvonmatt/cssg-plugin-grow v1.14.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

cssg-plugin-grow

Provides support for the grow static site generator.

This plugin handles some common configuration requirements when using the grow static site generator.

  • Prepends a $ in the yaml front matter to 'special' internal fields like slug, title, date, etc. (slug -> $slug) so they will be processed by grow.
  • Writes blueprint.yml files for the content-types configured in the typeConfig setting.
  • Resolves links to other entries using grow's yaml constructors. See https://grow.dev/reference/documents/#constructors

Install

npm install @jungvonmatt/cssg-plugin-grow

How to use

// In your contentful-ssg.config.js
plugins: [
  {
    resolve: `@jungvonmatt/cssg-plugin-grow`,
    options: {
      // Add any options here
    },
  },
];

Options

NameTypeDefaultDescription
typeConfigObjectundefinedPass a map with e.g. grow's blueprint config ({: {$path: '...', $view: '...'}})

For example, to mark the content types t-category and t-article as documents which require a blueprint config:

// In your contentful-ssg.config.js
plugins: [
  {
    resolve: `@jungvonmatt/cssg-plugin-grow`,
    options: {
      typeConfig: {
        't-category': {
          view: '/views/t-category.html',
          path: '/{locale}/{slug}/',
        },
        't-article': {
          view: '/views/t-article.html',
          path: '/{locale}/{slug}/',
        },
      },
    },
  },
];
1.14.0

3 months ago

1.12.3

1 year ago

1.12.0

1 year ago

1.11.3

1 year ago

1.11.2

1 year ago

1.11.1

1 year ago

1.11.0

2 years ago

1.10.0

2 years ago

1.9.0

2 years ago

1.8.0

2 years ago

1.7.5-alpha.5

2 years ago

1.7.5-alpha.0

2 years ago

1.7.5-alpha.6.5

2 years ago

1.8.0-alpha.2

2 years ago

1.8.0-alpha.0

2 years ago

1.8.0-alpha.1

2 years ago

1.8.0-alpha.6

2 years ago

1.8.0-alpha.4

2 years ago

1.8.0-alpha.5

2 years ago

1.7.4

2 years ago

1.7.3

2 years ago

1.7.1

2 years ago

1.7.0

2 years ago

1.4.9

2 years ago

1.4.8

2 years ago

1.4.0

2 years ago

1.1.0

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.2

2 years ago

1.0.0

2 years ago

1.0.0-alpha.0

2 years ago