diff --git a/generator/templates/ApiTemplate.ts b/generator/templates/ApiTemplate.ts index 3228f7fd..e35a7c81 100644 --- a/generator/templates/ApiTemplate.ts +++ b/generator/templates/ApiTemplate.ts @@ -1,7 +1,4 @@ const template = ` -import {HeroPattern} from "@/components/HeroPattern"; import {Note} from "@/components/mdx"; - - export const title = '<%- tag %>' diff --git a/src/components/Layout.jsx b/src/components/Layout.jsx index 69663c23..1cc1984d 100644 --- a/src/components/Layout.jsx +++ b/src/components/Layout.jsx @@ -102,10 +102,10 @@ function useTableOfContents(tableOfContents) { let headings = getHeadings(tableOfContents) function onScroll() { let top = window.scrollY - let current = headings[0].id + let current = headings[0]?.id for (let heading of headings) { - if (top >= heading.top) { - current = heading.id + if (top >= heading?.top) { + current = heading?.id } else { break } @@ -147,8 +147,6 @@ export function Layout({ children, title, tableOfContents }) { return ( <> - {/*
*/} -
- {!router.route.startsWith("/ipa/resources") &&
+ {!router.route.startsWith("/ipa/resources") && !router.route.includes("introductions") &&