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

remark-yaml-config

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-yaml-config

Configure remark with YAML front-matter

  • 2.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
34K
increased by15.43%
Maintainers
1
Weekly downloads
 
Created
Source

remark-yaml-config Build Status Coverage Status

Configure remark with YAML front-matter.

Installation

npm

npm install remark-yaml-config

remark-yaml-config is also available for duo, and as an AMD, CommonJS, and globals module, uncompressed and compressed.

Table of Contents

Usage

var yamlConfig = require('remark-yaml-config');
var remark = require('remark').use(yamlConfig);
var input = [
    '---',
    'remark:',
    '  commonmark: true',
    '  bullet: "*"',
    '---',
    '',
    '1) Commonmark list (this is a parse setting)',
    '',
    '- Hello (this is a stringification setting)',
    ''
].join('\n');
var tree = remark.parse(input);

Stringifying the document yields:

var doc = remark.stringify(tree);
---
remark:
  commonmark: true
  bullet: '*'
---

1.  Commonmark list (this is a parse setting)

*   Hello (this is a stringification setting)

API

remark.use(yamlConfig, options)

Passes the configuration found in YAML front-matter (under the remark key) to remark.

This is especially useful if you’re using remark’s CLI, which allows multiple documents to be processed in one go, but you’d like certain files to have different formatting.

Signatures

  • remark = remark.use(yamlConfig, options?).

Parameters

  • yamlConfig — This plugin;
  • options (Object?) — Passed to remark-yaml.

License

MIT © Titus Wormer

Keywords

FAQs

Package last updated on 26 Dec 2015

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