Skip to content

Commit

Permalink
fix: remove unused search
Browse files Browse the repository at this point in the history
  • Loading branch information
itsacoyote committed Sep 5, 2024
1 parent 4cd8f0e commit 9635ebf
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 36 deletions.
16 changes: 1 addition & 15 deletions app.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<script setup lang="ts">
import type { ParsedContent } from '@nuxt/content/types';
provideHeadlessUseId(() => useId());
const { seo } = useAppConfig();
Expand Down Expand Up @@ -33,18 +31,13 @@ useSeoMeta({
});
defineOgImageComponent('OgImageZK');
const { data: files } = useLazyFetch<ParsedContent[]>('/api/search.json', {
default: () => [],
server: false,
});
</script>

<template>
<div>
<NuxtLoadingIndicator />

<HeaderComponent :search="true" />
<HeaderComponent />

<UMain>
<NuxtLayout>
Expand All @@ -54,13 +47,6 @@ const { data: files } = useLazyFetch<ParsedContent[]>('/api/search.json', {

<FooterComponent />

<ClientOnly>
<LazyUContentSearch
:files="files"
:navigation="navigation || []"
/>
</ClientOnly>

<UNotifications />
</div>
</template>
14 changes: 1 addition & 13 deletions error.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<script setup lang="ts">
import type { NuxtError } from '#app';
import type { ParsedContent } from '@nuxt/content/dist/runtime/types';
useSeoMeta({
title: 'Page not found',
Expand All @@ -21,17 +20,13 @@ useHead({
});
const { data: navigation } = await useAsyncData('navigation', () => fetchContentNavigation());
const { data: files } = useLazyFetch<ParsedContent[]>('/api/search.json', {
default: () => [],
server: false,
});
provide('navigation', navigation);
</script>

<template>
<div>
<HeaderComponent :search="true" />
<HeaderComponent />

<UMain>
<UContainer>
Expand All @@ -43,13 +38,6 @@ provide('navigation', navigation);

<FooterComponent />

<ClientOnly>
<LazyUContentSearch
:files="files"
:navigation="navigation"
/>
</ClientOnly>

<UNotifications />
</div>
</template>
1 change: 0 additions & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export default defineNuxtConfig({
},
},
routeRules: {
'/api/search.json': { prerender: true },
'*-surround': { robots: false },
'/*/*-surround': { robots: false },
'/tutorials/*/_dir': { robots: false },
Expand Down
7 changes: 0 additions & 7 deletions server/api/search.json.get.ts

This file was deleted.

0 comments on commit 9635ebf

Please sign in to comment.