New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@developersgarage/sourcebit-target-eleventy

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@developersgarage/sourcebit-target-eleventy

A Sourcebit plugin for 11ty

latest
Source
npmnpm
Version
0.3.1
Version published
Maintainers
1
Created
Source

sourcebit-target-eleventy

[npm version

A Sourcebit plugin for the 11ty static site generator

👩‍🏫 Introduction

This plugin creates a JavaScript file (_data/data.js) to expose any Sourcebit data source through JavaScript properties consumable by the 11ty static site generator.

🏗 Installation

To install the plugin and add it to your project, run:

npm install sourcebit-target-eleventy --save

💡 You don't need to run this command if you start Sourcebit using the interactive setup process, as the CLI will install the plugin for you and add it as a dependency to your project.

⚙️ Configuration

The plugin accepts the following configuration parameters. They can be supplied in any of the following ways:

  • In the options object of the plugin configuration block inside sourcebit.js, with the value of the Property column as a key;
PropertyTypeVisibilityDefault valueEnv variableParameterDescription
contentModelsString ArrayPublicfalseA list of strings representing the content model names to be included as part of the data object used to create the pages

👀 Example configuration

sourcebit.js

module.exports = {
    plugins: [
        {
            module: require('sourcebit-target-eleventy'),
            contentModels: ['blog', 'about']
        }
    ]
};

🧞‍♂️ Interactive setup process

This plugin offers an interactive setup process via the npx create-sourcebit command. It asks users to select each of the content models present in the models data bucket to be accessbile within 11ty.

📥 Input

This plugin expects the following data buckets to exist:

  • models: An array of content models
  • objects: An array of objects with data corresponding to the models

📤 Output

This plugin creates creates a JavaScript (data.js) file in the _data folder.

Analytics

Keywords

headless

FAQs

Package last updated on 30 Oct 2020

Did you know?

Socket

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.

Install

Related posts