From 560bc2cd4b570afbf25cc2ec7291150256dee469 Mon Sep 17 00:00:00 2001 From: Sabrina Ferguson Date: Wed, 21 Aug 2024 16:40:07 -0400 Subject: [PATCH] fix: trailing slash --- firebase.json | 1 + nuxt.config.ts | 7 +++++++ server/api/search.json.get.ts | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/firebase.json b/firebase.json index 7dd16c19..b52d1530 100644 --- a/firebase.json +++ b/firebase.json @@ -1,5 +1,6 @@ { "hosting": { + "trailingSlash": false, "public": ".output/public", "ignore": ["firebase.json", "**/.*", "**/node_modules/**"] } diff --git a/nuxt.config.ts b/nuxt.config.ts index 61746ad1..fa6c3ac8 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -40,6 +40,13 @@ export default defineNuxtConfig({ '/_nuxt': { robots: false }, '/api/*': { robots: false }, }, + experimental: { + defaults: { + nuxtLink: { + trailingSlash: 'remove', + }, + }, + }, $production: process.env.NUXT_SITE_ENV ? {} : { diff --git a/server/api/search.json.get.ts b/server/api/search.json.get.ts index e075d921..2030727a 100644 --- a/server/api/search.json.get.ts +++ b/server/api/search.json.get.ts @@ -2,6 +2,6 @@ import { serverQueryContent } from '#content/server'; export default eventHandler(async (event) => { return serverQueryContent(event) - .where({ _type: 'markdown', navigation: { $ne: false } }) + .where({ _type: 'markdown', navigation: { $ne: false }, _partial: false }) .find(); });