From 9c7b4bc4892ff8679a4f910b38cd3cbee15c8980 Mon Sep 17 00:00:00 2001 From: macdonst Date: Thu, 5 Sep 2024 16:13:23 -0400 Subject: [PATCH] Remove nav data from blog routes Signed-off-by: macdonst --- app/api/blog/index.mjs | 5 ----- app/api/blog/posts/$$.mjs | 4 ---- 2 files changed, 9 deletions(-) diff --git a/app/api/blog/index.mjs b/app/api/blog/index.mjs index eb4c88d..d8778c3 100644 --- a/app/api/blog/index.mjs +++ b/app/api/blog/index.mjs @@ -2,7 +2,6 @@ import path from 'path' import url from 'url' import { readFileSync } from 'fs' import { parseDate } from '../../lib/parseDate.mjs' -import navDataLoader from '../../docs/nav-data.mjs' function isPublished (str) { return process.env.DISABLE_DATE_CHECK === 'true' @@ -26,9 +25,6 @@ export async function get (req) { const offset = parsedOffset >= 0 ? parsedOffset : 0 const total = posts.length - const { path: activePath } = req - const navData = navDataLoader('docs', activePath) - return { json: { posts, @@ -38,7 +34,6 @@ export async function get (req) { total, account, activeRoute: 'blog', - navData, }, } } diff --git a/app/api/blog/posts/$$.mjs b/app/api/blog/posts/$$.mjs index 918e4d9..4856859 100644 --- a/app/api/blog/posts/$$.mjs +++ b/app/api/blog/posts/$$.mjs @@ -7,7 +7,6 @@ import { URL } from 'url' import { default as defaultClassMapping } from '../../markdown-class-mappings.mjs' // import { getWebMentions } from '../../../../shared/webmentions.mjs' import { readFileSync } from 'fs' -import navDataLoader from '../../../docs/nav-data.mjs' /** @type {import('@enhance/types').EnhanceApiFn} */ export async function get (req) { @@ -66,8 +65,6 @@ export async function get (req) { ? 'max-age=3600;' : 'no-cache, no-store, must-revalidate, max-age=0, s-maxage=0' - const navData = navDataLoader('docs', activePath) - return { headers: { 'cache-control': cacheControl, @@ -83,7 +80,6 @@ export async function get (req) { // mentions, account, activeRoute: 'blog', - navData, }, } }