Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

broccoli-pages

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

broccoli-pages

Build HTML pages from Markdown and HTML fragments

  • 0.2.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

Broccoli Pages Filter

Allows you to generate HTML from Markdown and HTML fragments. You can specify metadata for each page. In metadata, you can specify a Handlebars template to be used to wrap this content.

Example Page

---
title: Hello World
description: some text
template: default.hbs
---
**Beautiful World**

Usage

var MarkdownPages = require('broccoli-pages').MarkdownPages;
var HTMLPages = require('broccoli-pages').HTMLPages;
var HBSPages = require('broccoli-pages').HBSPages;
var pickFiles = require('broccoli-static-compiler');

var options = {
  templates: './templates',
  helpers: './helpers',
  partials: './templates/partials',
  globals: {
    message: "Hello World!",
    team: [ 'Bob', 'Joe', 'Mary' ]
  }
};

var content = pickFiles('content', {
  srcDir: '/',
  files: ['**/*.*'],
  destDir: '/'
});

var html;

html = HTMLPages(content, options);
html = MarkdownPages(html, options);
html = HBSPages(html, options);

module.exports = html;

You can see an example Brocfile.js and example directory.

FAQs

Package last updated on 16 Sep 2014

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc