docs: improve design (#2097)
This commit is contained in:
@@ -17,7 +17,7 @@ const LINKS = [
|
||||
|
||||
export default function Footer() {
|
||||
return (
|
||||
<footer class="border-t-2 border-gray-200 md:h-16 flex my-8 justify-center">
|
||||
<footer class="border-t-2 border-gray-200 md:h-16 flex mt-16 justify-center md:mx-16">
|
||||
<div class="flex flex-col sm:flex-row gap-4 justify-between items-center max-w-screen-xl mx-auto w-full sm:px-6 md:px-8 p-4">
|
||||
<div class="text-gray-600 text-center">
|
||||
<span>© {new Date().getFullYear()} the Fresh authors</span>
|
||||
|
||||
@@ -24,7 +24,7 @@ export default function NavigationBar(
|
||||
const isHome = props.active == "/";
|
||||
return (
|
||||
<nav class={"flex " + props.class ?? ""}>
|
||||
<ul class="flex justify-center items-center gap-2 sm:gap-4 mx-4 my-2 sm:my-6 flex-wrap">
|
||||
<ul class="flex justify-center items-center gap-2 sm:gap-4 mx-4 my-2 sm:my-6 flex-wrap lg:mx-8 2xl:mr-0">
|
||||
{items.map((item) => (
|
||||
<li>
|
||||
<a
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
"lock": false,
|
||||
"nodeModulesDir": true,
|
||||
"tasks": {
|
||||
"start": "deno run -A --watch=static/,routes/,../src dev.ts",
|
||||
"start": "deno run -A --watch=static/,routes/,../src,../docs dev.ts",
|
||||
"build": "deno run -A dev.ts build",
|
||||
"preview": "deno run -A main.ts"
|
||||
},
|
||||
|
||||
@@ -18,6 +18,7 @@ import * as $CopyArea from "./islands/CopyArea.tsx";
|
||||
import * as $Counter from "./islands/Counter.tsx";
|
||||
import * as $LemonDrop from "./islands/LemonDrop.tsx";
|
||||
import * as $SearchButton from "./islands/SearchButton.tsx";
|
||||
import * as $TableOfContents from "./islands/TableOfContents.tsx";
|
||||
import * as $VersionSelect from "./islands/VersionSelect.tsx";
|
||||
import { type Manifest } from "$fresh/server.ts";
|
||||
|
||||
@@ -41,6 +42,7 @@ const manifest = {
|
||||
"./islands/Counter.tsx": $Counter,
|
||||
"./islands/LemonDrop.tsx": $LemonDrop,
|
||||
"./islands/SearchButton.tsx": $SearchButton,
|
||||
"./islands/TableOfContents.tsx": $TableOfContents,
|
||||
"./islands/VersionSelect.tsx": $VersionSelect,
|
||||
},
|
||||
baseUrl: import.meta.url,
|
||||
|
||||
@@ -0,0 +1,179 @@
|
||||
import { useEffect, useRef, useState } from "preact/hooks";
|
||||
import { MarkdownHeading } from "../utils/markdown.ts";
|
||||
|
||||
export interface TableOfContentsProps {
|
||||
headings: MarkdownHeading[];
|
||||
}
|
||||
|
||||
function setActiveLink(
|
||||
container: HTMLElement,
|
||||
marker: HTMLElement,
|
||||
id: string,
|
||||
) {
|
||||
container.querySelectorAll(`a`).forEach((link) =>
|
||||
link.classList.remove("active")
|
||||
);
|
||||
const tocLink = container.querySelector(
|
||||
`a[href="#${id}"]`,
|
||||
) as HTMLElement;
|
||||
|
||||
tocLink.classList.add("active");
|
||||
|
||||
const rect = tocLink
|
||||
.getBoundingClientRect();
|
||||
const markerRect = marker.getBoundingClientRect();
|
||||
|
||||
const top = tocLink.offsetTop + (rect.height / 2) -
|
||||
(markerRect.height / 2);
|
||||
marker.style.cssText = `transform: translate3d(0, ${top}px, 0); opacity: 1`;
|
||||
}
|
||||
|
||||
export function TableOfContents({ headings }: TableOfContentsProps) {
|
||||
const ref = useRef<HTMLDivElement>(null);
|
||||
const refMarker = useRef<HTMLDivElement>(null);
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
if (!ref.current) return;
|
||||
const container = ref.current;
|
||||
|
||||
const activeList = new Array(headings.length).fill(false);
|
||||
const visibleList = new Array(headings.length).fill(false);
|
||||
|
||||
const marker = refMarker.current!;
|
||||
const observer = new IntersectionObserver((entries) => {
|
||||
for (let i = 0; i < entries.length; i++) {
|
||||
const entry = entries[i];
|
||||
const target = entry.target;
|
||||
|
||||
for (let j = 0; j < headings.length; j++) {
|
||||
const heading = headings[j];
|
||||
if (heading.id === target.id) {
|
||||
const active = entry.isIntersecting ||
|
||||
entry.boundingClientRect.top < 0;
|
||||
activeList[j] = active;
|
||||
visibleList[j] = entry.isIntersecting;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Reset links
|
||||
for (let i = 0; i < headings.length; i++) {
|
||||
const id = headings[i].id;
|
||||
const tocLink = container.querySelector(
|
||||
`a[href="#${id}"]`,
|
||||
) as HTMLElement;
|
||||
tocLink.classList.remove("active");
|
||||
}
|
||||
|
||||
let activeIdx = visibleList.indexOf(true);
|
||||
if (activeIdx < 0) {
|
||||
activeIdx = activeList.lastIndexOf(true);
|
||||
}
|
||||
|
||||
if (activeIdx > -1) {
|
||||
const id = headings[activeIdx].id;
|
||||
setActiveLink(container, marker, id);
|
||||
} else {
|
||||
marker.style.cssText = `transform: translate3d(0, 0, 0); opacity: 0`;
|
||||
}
|
||||
});
|
||||
|
||||
document.querySelectorAll(
|
||||
".markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6",
|
||||
).forEach((elem) => {
|
||||
observer.observe(elem);
|
||||
});
|
||||
|
||||
return () => {
|
||||
observer.disconnect();
|
||||
};
|
||||
}, [headings]);
|
||||
|
||||
return (
|
||||
<div
|
||||
ref={ref}
|
||||
class="relative xl:order-2 w-56 xl:max-w-xs xl:top-14 shrink-0"
|
||||
>
|
||||
{headings.length > 0 && (
|
||||
<>
|
||||
<div class="xl:hidden mx-4 md:mx-0 mt-4 md:mt-0">
|
||||
<button
|
||||
id="toc-outline-btn"
|
||||
onClick={() => setIsOpen((v) => !v)}
|
||||
class="bg-gray-100 py-2 px-4 rounded border border-gray-300 flex items-center hover:border-green-600 transition-colors text-sm"
|
||||
>
|
||||
On this page
|
||||
<svg
|
||||
class={`w-4 h-4 inline-block ml-2 -rotate-90 [&.active]:rotate-0 ${
|
||||
isOpen ? "active" : ""
|
||||
}`}
|
||||
>
|
||||
<use href="/icons.svg#arrow-down" />
|
||||
</svg>
|
||||
</button>
|
||||
{isOpen && (
|
||||
<div class="mt-2 pl-4 border-l border-gray-250 text-[13px] leading-7">
|
||||
<nav aria-labelledby="toc-outline-btn">
|
||||
<ul>
|
||||
{headings.map((heading) => {
|
||||
return (
|
||||
<li key={heading.id}>
|
||||
<a
|
||||
href={`#${heading.id}`}
|
||||
class="block truncatetext-gray-600"
|
||||
>
|
||||
{heading.html}
|
||||
</a>
|
||||
</li>
|
||||
);
|
||||
})}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div class="hidden xl:block xl:sticky top-16">
|
||||
<div class="relative">
|
||||
<div
|
||||
ref={refMarker}
|
||||
class="marker w-[2px] bg-green-400 h-5 absolute top-0 opacity-0 transition-all"
|
||||
/>
|
||||
<div class="pl-4 border-l border-gray-250 text-[13px] leading-7">
|
||||
<div role="heading" aria-level={2} class="font-semibold">
|
||||
On this page
|
||||
</div>
|
||||
<nav aria-labelledby="doc-outline-aria-label">
|
||||
<span id="doc-outline-aria-label" class="sr-only">
|
||||
Table of Contents for current page
|
||||
</span>
|
||||
<ul>
|
||||
{headings.map((heading) => {
|
||||
return (
|
||||
<li key={heading.id}>
|
||||
<a
|
||||
href={`#${heading.id}`}
|
||||
class="block truncate transition-colors text-gray-600 [&.active]:text-green-600"
|
||||
onClick={() => {
|
||||
setActiveLink(
|
||||
ref.current!,
|
||||
refMarker.current!,
|
||||
heading.id,
|
||||
);
|
||||
}}
|
||||
>
|
||||
{heading.html}
|
||||
</a>
|
||||
</li>
|
||||
);
|
||||
})}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -11,6 +11,7 @@ import {
|
||||
} from "../../data/docs.ts";
|
||||
import { frontMatter, renderMarkdown } from "../../utils/markdown.ts";
|
||||
import toc from "../../../docs/toc.ts";
|
||||
import { TableOfContents } from "../../islands/TableOfContents.tsx";
|
||||
|
||||
interface Data {
|
||||
page: Page;
|
||||
@@ -142,7 +143,7 @@ export default function DocsPage(props: PageProps<Data>) {
|
||||
description = String(page.data.description);
|
||||
}
|
||||
|
||||
const html = renderMarkdown(page.markdown);
|
||||
const { html, headings } = renderMarkdown(page.markdown);
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -157,7 +158,7 @@ export default function DocsPage(props: PageProps<Data>) {
|
||||
<meta property="og:image" content={ogImageUrl} />
|
||||
<meta name="view-transition" content="same-origin" />
|
||||
</Head>
|
||||
<div class="flex flex-col min-h-screen mx-auto max-w-screen-xl">
|
||||
<div class="flex flex-col min-h-screen mx-auto max-w-screen-2xl">
|
||||
<div class="flex-1 " f-client-nav>
|
||||
<div class=" md:flex">
|
||||
<nav class="w-[18rem] flex-shrink-0 hidden md:block px-4">
|
||||
@@ -169,9 +170,9 @@ export default function DocsPage(props: PageProps<Data>) {
|
||||
<Partial name="docs-main">
|
||||
<div class="w-full min-w-0">
|
||||
<Header title="docs" active="/docs" />
|
||||
<main class="max-w-3xl mt-4 min-w-0 mx-auto">
|
||||
<main class="mt-4 min-w-0 mx-auto">
|
||||
<MobileSidebar page={page} />
|
||||
<div class="flex mx-auto max-w-screen-xl px-4 md:px-0 md:py-0 justify-end bg-gray-100">
|
||||
<div class="flex mx-auto max-w-screen-2xl px-4 md:px-0 md:py-0 justify-end bg-gray-100">
|
||||
<label
|
||||
for="docs_sidebar"
|
||||
class="px-4 py-3 md:hidden flex items-center hover:bg-gray-100 rounded gap-2 cursor-pointer"
|
||||
@@ -193,19 +194,42 @@ export default function DocsPage(props: PageProps<Data>) {
|
||||
<div>Table of Contents</div>
|
||||
</label>
|
||||
</div>
|
||||
<h1 class="text-4xl text-gray-900 tracking-tight font-extrabold md:mt-0 px-4">
|
||||
{page.title}
|
||||
</h1>
|
||||
<div
|
||||
class="mt-6 markdown-body"
|
||||
dangerouslySetInnerHTML={{ __html: html }}
|
||||
/>
|
||||
<ForwardBackButtons
|
||||
slug={page.slug}
|
||||
version={page.version}
|
||||
prev={page.prevNav}
|
||||
next={page.nextNav}
|
||||
/>
|
||||
<div class="flex gap-6 md:gap-8 xl:gap-[8%] flex-col xl:flex-row md:mx-8 lg:mx-16 2xl:mx-0 lg:justify-end">
|
||||
<TableOfContents headings={headings} />
|
||||
|
||||
<div class="lg:order-1 min-w-0 max-w-3xl">
|
||||
<h1 class="text-4xl text-gray-900 tracking-tight font-bold md:mt-0 px-4 md:px-0 mb-4">
|
||||
{page.title}
|
||||
</h1>
|
||||
<div
|
||||
class="markdown-body mb-8"
|
||||
dangerouslySetInnerHTML={{ __html: html }}
|
||||
/>
|
||||
|
||||
<div class="mb-8">
|
||||
<ForwardBackButtons
|
||||
slug={page.slug}
|
||||
version={page.version}
|
||||
prev={page.prevNav}
|
||||
next={page.nextNav}
|
||||
/>
|
||||
</div>
|
||||
<hr />
|
||||
<div class="px-4 md:px-0 flex justify-between my-6">
|
||||
<a
|
||||
href={`https://github.com/denoland/fresh/edit/main/${page.file}`}
|
||||
class="text-green-600 underline flex items-center"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<svg class="w-4 h-4 inline-block mr-1">
|
||||
<use href="/icons.svg#external" />
|
||||
</svg>
|
||||
Edit this page on GitHub
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<Footer />
|
||||
</main>
|
||||
</div>
|
||||
@@ -246,8 +270,6 @@ function MobileSidebar(props: { page: Page }) {
|
||||
);
|
||||
}
|
||||
|
||||
const button = "p-2 bg-gray-100 w-full border(1 gray-200) grid";
|
||||
|
||||
function ForwardBackButtons(props: {
|
||||
slug: string;
|
||||
version: string;
|
||||
@@ -255,34 +277,39 @@ function ForwardBackButtons(props: {
|
||||
next?: NavEntry;
|
||||
}) {
|
||||
const { prev, next } = props;
|
||||
const upper = "text-sm text-gray-600";
|
||||
const category = "font-normal";
|
||||
const lower = "text-gray-900 font-medium";
|
||||
|
||||
return (
|
||||
<div class="px-4 mt-8 flex flex-col md:flex-row gap-4">
|
||||
{prev && (
|
||||
<a href={prev.href} class={`${button} text-left`}>
|
||||
<span class={upper}>{"←"} Previous</span>
|
||||
<span class={lower}>
|
||||
<span class={category}>
|
||||
{prev.category ? `${prev.category}: ` : ""}
|
||||
<div class="px-4 md:px-0 mt-8 flex flex-col sm:flex-row gap-4 justify-between">
|
||||
{prev
|
||||
? (
|
||||
<a
|
||||
href={prev.href}
|
||||
class="px-4 py-2 text-left rounded border border-gray-200 grid border-solid w-full hover:border-green-600 transition-colors"
|
||||
>
|
||||
<span class="text-sm text-gray-600">
|
||||
Previous page
|
||||
</span>
|
||||
{prev.title}
|
||||
</span>
|
||||
</a>
|
||||
)}
|
||||
{next && (
|
||||
<a href={next.href} class={`${button} text-right`}>
|
||||
<span class={upper}>Next {"→"}</span>
|
||||
<span class={lower}>
|
||||
<span class={category}>
|
||||
{next.category ? `${next.category}: ` : ""}
|
||||
<span class="text-green-600 font-medium">
|
||||
{prev.title}
|
||||
</span>
|
||||
{next.title}
|
||||
</span>
|
||||
</a>
|
||||
)}
|
||||
</a>
|
||||
)
|
||||
: <div class="w-full" />}
|
||||
{next
|
||||
? (
|
||||
<a
|
||||
href={next.href}
|
||||
class="px-4 py-2 text-right rounded border border-gray-200 border-solid grid w-full hover:border-green-600 transition-colors"
|
||||
>
|
||||
<span class="text-sm text-gray-600">
|
||||
Next page
|
||||
</span>
|
||||
<span class="text-green-600 font-medium">
|
||||
{next.title}
|
||||
</span>
|
||||
</a>
|
||||
)
|
||||
: <div class="w-full" />}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -21,6 +21,14 @@
|
||||
<path d="M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0z" />
|
||||
<path d="M12 16h.01" />
|
||||
</symbol>
|
||||
|
||||
<symbol id="external" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25" />
|
||||
</symbol>
|
||||
|
||||
<symbol id="arrow-down" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M19.5 8.25l-7.5 7.5-7.5-7.5" />
|
||||
</symbol>
|
||||
</svg>
|
||||
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.7 KiB |
+32
-16
@@ -4,7 +4,7 @@
|
||||
--color-prettylights-syntax-constant: #0550ae;
|
||||
--color-prettylights-syntax-entity: #8250df;
|
||||
--color-prettylights-syntax-storage-modifier-import: #24292f;
|
||||
--color-prettylights-syntax-entity-tag: #116329;
|
||||
--color-prettylights-syntax-entity-tag: #22863a;
|
||||
--color-prettylights-syntax-keyword: #cf222e;
|
||||
--color-prettylights-syntax-string: #0a3069;
|
||||
--color-prettylights-syntax-variable: #953800;
|
||||
@@ -31,7 +31,7 @@
|
||||
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Noto Sans, Helvetica,
|
||||
Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
line-height: 1.75;
|
||||
}
|
||||
.markdown-body:before {
|
||||
content: "";
|
||||
@@ -64,6 +64,9 @@
|
||||
.markdown-body .anchor:focus {
|
||||
outline: none;
|
||||
}
|
||||
.markdown-body p {
|
||||
margin: 1rem;
|
||||
}
|
||||
.markdown-body p,
|
||||
.markdown-body blockquote,
|
||||
.markdown-body ul,
|
||||
@@ -72,8 +75,7 @@
|
||||
.markdown-body table,
|
||||
.markdown-body pre,
|
||||
.markdown-body details {
|
||||
margin-top: 0;
|
||||
margin-bottom: 16px;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
.markdown-body hr {
|
||||
height: 0.25em;
|
||||
@@ -145,14 +147,10 @@
|
||||
font-size: inherit;
|
||||
padding: 0 0.2em;
|
||||
}
|
||||
.markdown-body h1 {
|
||||
border-bottom: 1px solid var(--color-border-muted);
|
||||
padding-bottom: 0.3em;
|
||||
font-size: 2em;
|
||||
}
|
||||
.markdown-body h2 {
|
||||
border-bottom: 1px solid var(--color-border-muted);
|
||||
padding-bottom: 0.3em;
|
||||
border-top: 1px solid var(--color-border-muted);
|
||||
padding-top: 1.25rem;
|
||||
margin-top: 2rem;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
.markdown-body h3 {
|
||||
@@ -369,8 +367,8 @@
|
||||
background-color: var(--color-neutral-muted);
|
||||
border-radius: 6px;
|
||||
margin: 0;
|
||||
padding: 0.2em 0.4em;
|
||||
font-size: 85%;
|
||||
padding: 0.1875rem 0.375rem;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
.markdown-body code br,
|
||||
.markdown-body tt br {
|
||||
@@ -409,7 +407,7 @@
|
||||
.markdown-body pre {
|
||||
background-color: var(--color-canvas-subtle);
|
||||
border-radius: 6px;
|
||||
padding: 16px;
|
||||
padding: 1.25rem 1.5rem;
|
||||
font-size: 85%;
|
||||
line-height: 1.45;
|
||||
overflow: auto;
|
||||
@@ -606,6 +604,7 @@
|
||||
|
||||
.markdown-body .admonition {
|
||||
padding: 1rem;
|
||||
margin: 1.5rem;
|
||||
}
|
||||
.markdown-body .admonition-header {
|
||||
font-weight: bold;
|
||||
@@ -659,7 +658,6 @@
|
||||
}
|
||||
|
||||
@media screen and (min-width: 768px) {
|
||||
.markdown-body .fenced-code,
|
||||
.markdown-body table {
|
||||
margin-left: 1rem;
|
||||
margin-right: 1rem;
|
||||
@@ -669,6 +667,25 @@
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.markdown-body .admonition {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.markdown-body .fenced-code,
|
||||
.markdown-body h1,
|
||||
.markdown-body h2,
|
||||
.markdown-body h4,
|
||||
.markdown-body h5,
|
||||
.markdown-body h6,
|
||||
.markdown-body p {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
.markdown-body h3 {
|
||||
margin: 2rem 0 1rem 0;
|
||||
}
|
||||
}
|
||||
|
||||
ol.nested {
|
||||
@@ -713,7 +730,6 @@ ol.nested li:before {
|
||||
}
|
||||
|
||||
.markdown-body .highlight {
|
||||
border: 1px solid #eaeef1;
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
|
||||
|
||||
+12
-3
@@ -17,7 +17,14 @@ Marked.marked.use(mangle());
|
||||
|
||||
const ADMISSION_REG = /^<p>\[(info|warn|tip)\]:\s/;
|
||||
|
||||
export interface MarkdownHeading {
|
||||
id: string;
|
||||
html: string;
|
||||
}
|
||||
|
||||
class DefaultRenderer extends Marked.Renderer {
|
||||
headings: MarkdownHeading[] = [];
|
||||
|
||||
text(text: string): string {
|
||||
// Smartypants typography enhancement
|
||||
return text
|
||||
@@ -39,6 +46,7 @@ class DefaultRenderer extends Marked.Renderer {
|
||||
slugger: Marked.Slugger,
|
||||
): string {
|
||||
const slug = slugger.slug(raw);
|
||||
this.headings.push({ id: slug, html: text });
|
||||
return `<h${level} id="${slug}"><a class="md-anchor" tabindex="-1" href="#${slug}">${text}<span aria-hidden="true">#</span></a></h${level}>`;
|
||||
}
|
||||
|
||||
@@ -124,15 +132,16 @@ export interface MarkdownOptions {
|
||||
export function renderMarkdown(
|
||||
input: string,
|
||||
opts: MarkdownOptions = {},
|
||||
): string {
|
||||
): { headings: MarkdownHeading[]; html: string } {
|
||||
const renderer = new DefaultRenderer();
|
||||
const markedOpts: Marked.MarkedOptions = {
|
||||
gfm: true,
|
||||
renderer: new DefaultRenderer(),
|
||||
renderer,
|
||||
};
|
||||
|
||||
const html = opts.inline
|
||||
? Marked.parseInline(input, markedOpts) as string
|
||||
: Marked.parse(input, markedOpts) as string;
|
||||
|
||||
return html;
|
||||
return { headings: renderer.headings, html };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user