1.0.12 • Published 6 years ago

markdown-article-format v1.0.12

Weekly downloads
14
License
MIT
Repository
-
Last release
6 years ago

markdown-article-format

Transform markdown articles to HTML, AMP, FB Instant Articles, Apple News Format, and Mic's article-json format

:warning: Work In Progress!

This library is under heavy early development. We don't recommend using it just yet. Check back here for updates!


Installation

yarn add markdown-article-format

Usage

markdown -> html

import { markdownToHtml } from 'markdown-article-format';

const html = markdownToHtml(`
  # Example
  This is an example.
`);

markdown -> amp

import { markdownToAmp } from 'markdown-article-format';

const amp = markdownToAmp(`
  # Example
  This is an example.
`);

markdown -> appleNews

import { markdownToAppleNews } from 'markdown-article-format';

const appleNews = markdownToAppleNews(`
  # Example
  This is an example.
`, {
  title: 'Example',
  subtitle: 'Just an example',
  authorName: 'Dan Scanlon', // optional
  authorLink: 'https://github.com/danscan', // optional
  // featuredImage, // TODO: Use this
  canonicalUrl: 'https://github.com/futurism-core/markdown-article-format',
  slug: 'markdown-article-format',
  tags: ['markdown', 'formatting', 'apple news'],
  publishedDate: new Date(),
  updatedDate: new Date(),
  // apple news document styling options (optional)
  // layout,
  // componentLayouts,
  // componentTextStyles,
  // componentStyles,
  // textStyles,
});
1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago