Skip to content

两个小问题 #2714

Answered by Mister-Hope
Ackerven asked this question in Q&A
Jan 27, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote
  1. Fixed in c6bbf2b
  2. Expected, the plugin has no idea what frontmatter.category type should be unless you tell it.
    searchProPlugin({
      indexContent: true,
      hotReload: true,
      customFields: [
        {
          getter: ({
            frontmatter,
          }: Page<Record<string, unknown>, { tag?: string[] }>) =>
            frontmatter.tag || null,
          formatter: `Tag: $content`,
        },
      ],
    }),
    searchProPlugin({
      indexContent: true,
      hotReload: true,
      customFields: [
        {
          getter: ({ frontmatter }) => frontmatter.tag as string[],
          formatter: `Tag: $content`,
        },
      ],
    }),

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Ackerven
Comment options

Answer selected by Mister-Hope
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants