Jacky Zhao
2023-06-04 9ad89997a533744695b380b315f1f70293bb30c4
quartz/plugins/transformers/gfm.ts
@@ -2,13 +2,17 @@
import remarkGfm from "remark-gfm"
import smartypants from 'remark-smartypants'
import { QuartzTransformerPlugin } from "../types"
import rehypeSlug from "rehype-slug"
import rehypeAutolinkHeadings from "rehype-autolink-headings"
export interface Options {
  enableSmartyPants: boolean
  linkHeadings: boolean
}
const defaultOptions: Options = {
  enableSmartyPants: true
  enableSmartyPants: true,
  linkHeadings: true
}
export class GitHubFlavoredMarkdown extends QuartzTransformerPlugin {
@@ -25,6 +29,13 @@
  }
  htmlPlugins(): PluggableList {
    return []
    return this.opts.linkHeadings
      ? [rehypeSlug, [rehypeAutolinkHeadings, {
        behavior: 'append', content: {
          type: 'text',
          value: 'ยง'
        }
      }]]
      : []
  }
}