1.2.1 ā€¢ Published 4 months ago

remark-fff v1.2.1

Weekly downloads
-
License
WTFPL
Repository
github
Last release
4 months ago

Remark FFF

npm minified size downloads

šŸŒŸ Remark plugin for auto-conversion other frontmatter variable formats to FFF Flavored Frontmatter.

What is this?

This package is a unified (remark) plugin to convert other frontmatter variable formats to FFF Flavored Frontmatter.

Using it, you can painlessly migrate posts from old to FFF-compatible blog frameworks that use Remark.

Install

This package supports both ESM and CJS.

pnpm add remark-fff # pnpm
# yarn add remark-fff # yarn
# npm i remark-fff # npm

Usage

Use in MDsveX or Astro or Nuxt:

import remarkFFF from 'remark-fff'

export default {
  remarkPlugins: [
    // without options
    remarkFFF,
    // with options
    [remarkFFF, { presets: ['hugo'], target: 'astro' }]
  ],
}

Options

Configuration (optional).

options.presets

default: []

Specifies a preset for how remark-fff will be converted.

You can create your own presets, or import some from fff-transform-presets.

import remarkFFF from 'remark-fff'
import { hugo } from 'fff-transform-presets'

remarkFFF({
  presets: [
    hugo
    {
      created: 'date',
      flags: ({ draft }) => (draft ? ['draft'] : []),
      summary: 'excerpt',
    },
  ],
})

options.target

default: mdsvex

Packages that use this plugin currently support MDsveX, Astro and Nuxt.

import remarkFFF from 'remark-fff'

remarkFFF({ target: 'astro' })

options.strict

default: undefined

Forced conversion to a single type, currently limited to media variables.

import remarkFFF from 'remark-fff'

remarkFFF({
  strict: {
    media: {
      type: 'string',
      array: false,
    },
  },
})
1.2.1

4 months ago

1.2.0

4 months ago

1.2.0-alpha.2

4 months ago

1.2.0-alpha.1

4 months ago

1.2.0-alpha.0

5 months ago

1.1.0

8 months ago

1.0.1

11 months ago

1.0.0

11 months ago

1.1.0-alpha.0

9 months ago

1.0.0-alpha.1

12 months ago

1.0.0-alpha.0

12 months ago

0.5.3

1 year ago

0.5.2

1 year ago

0.5.1

1 year ago

0.4.0-alpha.0

2 years ago

0.5.0

1 year ago

0.4.1

1 year ago

0.4.0

1 year ago

0.4.2

1 year ago

0.3.0

2 years ago

0.3.0-alpha.1

2 years ago

0.3.0-alpha.0

2 years ago