Skip to content

Commit

Permalink
support matter and frontmatter
Browse files Browse the repository at this point in the history
  • Loading branch information
timlrx committed Aug 11, 2024
1 parent e96eb7c commit 343237b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ const rehypeCitationGenerator = (Cite) => {
/** @type {string[]} */
let bibtexFile = []
/** @type {string} */ // @ts-ignore
const inputCiteformat = options.csl || file?.data?.frontmatter?.csl || defaultCiteFormat
const inputCiteformat =
options.csl || file?.data?.matter?.csl || file?.data?.frontmatter?.csl || defaultCiteFormat
/** @type {string[] | false} */ // @ts-ignore
const noCite = options.noCite || file?.data?.frontmatter?.csl || false
const noCite =
options.noCite || file?.data?.matter?.noCite || file?.data?.frontmatter?.noCite || false
const inputLang = options.lang || 'en-US'
const config = Cite.plugins.config.get('@csl')
const citeFormat = await loadCSL(Cite, inputCiteformat, options.path)
Expand Down

0 comments on commit 343237b

Please sign in to comment.