1.14.2 • Published 1 year ago

@jungvonmatt/cssg-plugin-grow v1.14.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year 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.2

1 year ago

1.14.0

1 year ago

1.12.3

2 years ago

1.12.0

2 years ago

1.11.3

2 years ago

1.11.2

2 years ago

1.11.1

2 years ago

1.11.0

3 years ago

1.10.0

3 years ago

1.9.0

3 years ago

1.8.0

3 years ago

1.7.5-alpha.5

3 years ago

1.7.5-alpha.0

3 years ago

1.7.5-alpha.6.5

3 years ago

1.8.0-alpha.2

3 years ago

1.8.0-alpha.0

3 years ago

1.8.0-alpha.1

3 years ago

1.8.0-alpha.6

3 years ago

1.8.0-alpha.4

3 years ago

1.8.0-alpha.5

3 years ago

1.7.4

3 years ago

1.7.3

3 years ago

1.7.1

3 years ago

1.7.0

3 years ago

1.4.9

3 years ago

1.4.8

3 years ago

1.4.0

3 years ago

1.1.0

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.2

4 years ago

1.0.0

4 years ago

1.0.0-alpha.0

4 years ago