perf: hide search api props md

This commit is contained in:
lisonge 2024-04-14 02:15:20 +08:00
parent 610ac5299e
commit 1a734e17ea

View File

@ -59,6 +59,19 @@ export default defineConfig({
},
search: {
provider: 'local',
options: {
_render(src, env, md) {
const html = md.render(src, env);
if (env.frontmatter?.search === false) return '';
if (
env.relativePath.startsWith('api/interfaces/') &&
env.relativePath.endsWith('Props.md')
) {
return '';
}
return html;
},
},
},
socialLinks: [{ icon: 'github', link: 'https://github.com/gkd-kit' }],
footer: {