From 1f3837b0f9b1a88b448223b6f64d3b35542459be Mon Sep 17 00:00:00 2001 From: Will King Date: Tue, 5 Mar 2024 09:06:45 -0600 Subject: [PATCH] Updates to support automation repo --- app/lib/docs/doc.server.ts | 2 +- app/lib/docs/mdx/index.server.ts | 3 +-- app/lib/docs/menu.ts | 2 -- app/styles/tailwind.css | 8 ++++++++ 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/app/lib/docs/doc.server.ts b/app/lib/docs/doc.server.ts index d4bc4a0..a8a6dc1 100644 --- a/app/lib/docs/doc.server.ts +++ b/app/lib/docs/doc.server.ts @@ -85,7 +85,7 @@ async function getFreshDoc({ ? privateContentPath(product, version) : contentPath(product, version) - return parseMdx(replaceConfigVars(mdx, config), docsPath) + return parseMdx(replaceConfigVars(mdx, config)) } export async function getDocFromDir(args: { diff --git a/app/lib/docs/mdx/index.server.ts b/app/lib/docs/mdx/index.server.ts index 11d55fe..10fe894 100644 --- a/app/lib/docs/mdx/index.server.ts +++ b/app/lib/docs/mdx/index.server.ts @@ -13,12 +13,11 @@ import { import { rehypeImages } from './img.server.ts' import rehypeWrapTable from './tables.server.ts' -export async function parseMdx(mdx: string, docsPath: string) { +export async function parseMdx(mdx: string) { // Pull all h2 & h3 headings let headings: Heading[] = [] const { frontmatter, code } = await bundleMDX({ source: mdx, - cwd: docsPath, mdxOptions(options) { options.remarkPlugins = [ ...(options.remarkPlugins ?? []), diff --git a/app/lib/docs/menu.ts b/app/lib/docs/menu.ts index 0060510..bcd550b 100644 --- a/app/lib/docs/menu.ts +++ b/app/lib/docs/menu.ts @@ -20,7 +20,6 @@ export function getBreadcrumbs({ const children: NavLink[] = splat .split('/') .reduce((acc, current, i) => { - console.log(acc, product.to) if (i === 0) { const item = menu.find( ({ slug }) => slug === `${product.to}/${current}`, @@ -86,7 +85,6 @@ export function getPagination(nav: NavItem[], path: string): Pagination { const grandChildPagination = nestedPagination(child, path) if (grandChildPagination) { if (!grandChildPagination.next) { - console.log(current) if (current.children[grandChildIndex + 1]) { grandChildPagination.next = navItemToLink( current.children[grandChildIndex + 1], diff --git a/app/styles/tailwind.css b/app/styles/tailwind.css index 03ec30b..66def00 100644 --- a/app/styles/tailwind.css +++ b/app/styles/tailwind.css @@ -137,6 +137,14 @@ @apply mb-0; } +.prose dt { + @apply my-1 font-display font-bold; +} + +.prose dd { + @apply mb-1 ml-6; +} + /*======== PRISM =========*/