Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add search components & enhancements #467

Merged
merged 3 commits into from
Nov 8, 2024
Merged

Conversation

WRXinYue
Copy link
Collaborator

@WRXinYue WRXinYue commented Oct 23, 2024

  • Added: New useFuseSearch composables to facilitate developer calls
  • Added: Added extendKeys configuration item to extend the fields obtained by search
  • Fixed: [yun] Fixed the issue where isLocked was ineffective in the yun theme
  • Changed: keys no longer extends the field 'content', but uses extendKeys for field extension
  • Changed: [yun] Updated the search code for the yun theme and encapsulated the hotkey tool

useFuseSearch demo

<script lang="ts" setup>
import { onMounted, ref } from 'vue'
import { useFuseSearch } from 'valaxy'

const input = ref()

const { results } = useFuseSearch(input)
</script>

<template>
  <input v-model="input">
</template>

extendKeys demo

import { defineSiteConfig } from 'valaxy'

export default defineSiteConfig({
  fuse: {
    extendKeys: ['cover'],
  },
})

Copy link

vercel bot commented Oct 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
valaxy-docs-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 31, 2024 4:11am

@YunYouJun
Copy link
Owner

Could you add more description for the difference between extendKeys and keys?

@WRXinYue
Copy link
Collaborator Author

That’s a wrap

@WRXinYue
Copy link
Collaborator Author

The extendKeys configuration item needs to be modified and is not recommended to be written in siteConfig.

@YunYouJun
Copy link
Owner

The extendKeys configuration item needs to be modified and is not recommended to be written in siteConfig.

I'm a little confused about this.

@YunYouJun YunYouJun merged commit 55ff977 into YunYouJun:main Nov 8, 2024
9 checks passed
Copy link

github-actions bot commented Nov 8, 2024

Yun Good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants