1.2.1 ā€¢ Published 4 months ago

fff-transform-presets v1.2.1

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

FFF Transform Presets

npm minified size downloads

šŸŒŸ Predefined transform presets for FFF Flavored Frontmatter.

Installation

pnpm add fff-transform-presets # pnpm
# yarn add fff-transform-presets # yarn
# npm i fff-transform-presets # npm

Usage

You can use it with the transform function or the remark-fff / markdown-it-fff plugin.

import { transform } from 'fff-flavored-frontmatter'
import { hexo, hexoReverse } from 'fff-transform-presets'

// original frontmatter
let fm = {
  // ...
}

// hexo => fff
fm = transform(fm, [hexo])

// fff => hexo
fm = transform(fm, [hexoReverse])
import { hugo } from 'fff-transform-presets'
import remarkFFF from 'remark-fff'

export default defineConfig({
  remarkPlugins: [
    [remarkFFF, { presets: [hugo], target: 'astro' }]
  ],
})
import { frontmatterPlugin } from '@mdit-vue/plugin-frontmatter'
import { hugo, mditVue } from 'fff-transform-presets'
import MarkdownIt from 'markdown-it'
import { fffPlugin } from 'markdown-it-fff'

const md = MarkdownIt().use(frontmatterPlugin, {
  grayMatterOptions: {
    excerpt: true,
  },
}).use(fffPlugin, {
  presets: [
    hugo,
    mditVue,
  ],
})
1.2.1

4 months ago

1.2.0

5 months ago

1.2.0-alpha.1

5 months ago

1.2.0-alpha.0

5 months ago

1.1.0

9 months ago

1.1.0-alpha.0

10 months ago

1.0.1

12 months ago

1.0.0

12 months ago

1.0.0-alpha.1

12 months ago

1.0.0-alpha.0

12 months ago

0.5.3

12 months ago