fff-transform-presets
TypeScript icon, indicating that this package has built-in type declarations

1.2.1 • Public • Published

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,
  ],
})

/fff-transform-presets/

    Package Sidebar

    Install

    npm i fff-transform-presets

    Homepage

    fff.js.org

    Weekly Downloads

    0

    Version

    1.2.1

    License

    WTFPL

    Unpacked Size

    15.1 kB

    Total Files

    6

    Last publish

    Collaborators

    • kwaa