Skip to content

Commit

Permalink
fix: header links (#209)
Browse files Browse the repository at this point in the history
# Description

Update docs-nuxt-template to fix missing main nav links.
  • Loading branch information
itsacoyote committed Sep 5, 2024
1 parent 7213406 commit 75cfa38
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 37 deletions.
16 changes: 1 addition & 15 deletions app.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
<script setup lang="ts">
import type { ParsedContent } from '@nuxt/content/dist/runtime/types';
const { seo } = useAppConfig();
const { data: navigation } = await useAsyncData('navigation', () => fetchContentNavigation());
provide('navigation', navigation);
const { data: files } = useLazyFetch<ParsedContent[]>('/api/search.json', {
default: () => [],
server: false,
});
useHead({
meta: [
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
Expand Down Expand Up @@ -50,7 +43,7 @@ useSeoMeta({
<NuxtPwaManifest />
<NuxtLoadingIndicator />

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

<UMain>
<NuxtLayout>
Expand All @@ -60,13 +53,6 @@ useSeoMeta({

<FooterComponent />

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

<UNotifications />
</div>
</template>
Binary file modified bun.lockb
Binary file not shown.
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 @@ -12,7 +12,6 @@ export default defineNuxtConfig({
},
},
routeRules: {
'/api/search.json': { prerender: true },
'/build/tooling': { redirect: '/build/tooling/zksync-block-explorers' },
'/build/tooling/foundry': { redirect: '/build/tooling/foundry/overview' },
'/build/developer-reference/ethereum-differences': {
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@
"vue-tsc": "^2.1.6"
},
"dependencies": {
"@matterlabs/docs-nuxt-template": "2.8.2",
"@matterlabs/docs-nuxt-template": "2.8.4",
"@iconify-json/heroicons": "^1.2.0",
"@iconify-json/simple-icons": "^1.2.1",
"@iconify-json/vscode-icons": "^1.2.0",
"@nuxt/content": "^2.13.2",
"@nuxt/eslint": "^0.5.5",
"@nuxt/fonts": "^0.3.0",
Expand Down
7 changes: 0 additions & 7 deletions server/api/search.json.get.ts

This file was deleted.

0 comments on commit 75cfa38

Please sign in to comment.