Skip to content

Commit

Permalink
Updates to support automation repo
Browse files Browse the repository at this point in the history
  • Loading branch information
wking-io committed Mar 5, 2024
1 parent 2be2d47 commit 1f3837b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/lib/docs/doc.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
3 changes: 1 addition & 2 deletions app/lib/docs/mdx/index.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?? []),
Expand Down
2 changes: 0 additions & 2 deletions app/lib/docs/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export function getBreadcrumbs({
const children: NavLink[] = splat
.split('/')
.reduce<NavItem[]>((acc, current, i) => {
console.log(acc, product.to)
if (i === 0) {
const item = menu.find(
({ slug }) => slug === `${product.to}/${current}`,
Expand Down Expand Up @@ -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],
Expand Down
8 changes: 8 additions & 0 deletions app/styles/tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,14 @@
@apply mb-0;
}

.prose dt {
@apply my-1 font-display font-bold;
}

.prose dd {
@apply mb-1 ml-6;
}

/*========
PRISM
=========*/
Expand Down

0 comments on commit 1f3837b

Please sign in to comment.