From ff70fd925230ef2bcac526fc5f967dc05e827392 Mon Sep 17 00:00:00 2001 From: Gadzhi Kharkharov Date: Tue, 15 Nov 2022 11:47:12 +0300 Subject: [PATCH 1/3] use highlightjs --- components/Article.tsx | 24 ++++- constants.ts | 214 +++++++++++++++++++++++++++++++++++++++++ deps.ts | 3 + main.ts | 6 +- markdown.ts | 19 ++-- pages.ts | 25 +++-- render.tsx | 14 ++- 7 files changed, 277 insertions(+), 28 deletions(-) diff --git a/components/Article.tsx b/components/Article.tsx index 8c680d8..6d42090 100644 --- a/components/Article.tsx +++ b/components/Article.tsx @@ -72,20 +72,34 @@ const contentStyles = css({ ol: apply` list(inside decimal) `, + "ul ul, ol ol": apply` + pl-4 + `, hr: apply` my-8 border(gray-200) dark:(border(gray-800)) `, + code: apply` + font-mono + text-sm + `, + ":not(pre) code": apply` + px-1 py-px + bg(pink-50 dark:(pink-300 opacity-20)) + rounded-sm + `, pre: apply` overflow-x-scroll text(xs md:sm) font-mono - py-0 px-4 + py-2 px-4 leading-snug - text(pink-700 dark:pink-300) border(l pink-700 opacity-30 dark:(pink-300 opacity-40)) `, + "pre:not(.hljs)": apply` + text(pink-700 dark:pink-300) + `, details: css( apply` px-4 py-3 @@ -127,6 +141,12 @@ const contentStyles = css({ py-1 pr-3 align-baseline `, + dt: apply` + font-semibold + `, + dd: apply` + pl-4 + `, ".full-bleed": apply` lg:(-mx-24) xl:(-mx-32) diff --git a/constants.ts b/constants.ts index 0b8322f..f9dfe42 100644 --- a/constants.ts +++ b/constants.ts @@ -37,3 +37,217 @@ OPTIONS: --port\t\tServe port (default: 8000) --drafts\t\tRender pages marked as drafts (default: false) --debug\t\tVerbose output and statistics (default: false)`; + +// highlight.js syntax highlighting from github primer +export const HIGHLIGHT_STYLE = ` +.hljs { + display: block; + overflow-x: auto; + color: #cdd9e5; +} + +.hljs-comment, +.hljs-punctuation { + color: #768390; +} + +.hljs-attr, +.hljs-attribute, +.hljs-meta, +.hljs-selector-attr, +.hljs-selector-class, +.hljs-selector-id { + color: #6cb6ff; +} + +.hljs-variable, +.hljs-literal, +.hljs-number, +.hljs-doctag { + color: #f69d50; +} + +.hljs-params { + color: #cdd9e5; +} + +.hljs-function { + color: #dcbdfb; +} + +.hljs-class, +.hljs-tag, +.hljs-title, +.hljs-built_in { + color: #8ddb8c; +} + +.hljs-keyword, +.hljs-type, +.hljs-builtin-name, +.hljs-meta-keyword, +.hljs-template-tag, +.hljs-template-variable { + color: #f47067; +} + +.hljs-string, +.hljs-undefined { + color: #96d0ff; +} + +.hljs-regexp { + color: #96d0ff; +} + +.hljs-symbol { + color: #6cb6ff; +} + +.hljs-bullet { + color: #f69d50; +} + +.hljs-section { + color: #6cb6ff; + font-weight: bold; +} + +.hljs-quote, +.hljs-name, +.hljs-selector-tag, +.hljs-selector-pseudo { + color: #8ddb8c; +} + +.hljs-emphasis { + color: #f69d50; + font-style: italic; +} + +.hljs-strong { + color: #f69d50; + font-weight: bold; +} + +.hljs-deletion { + color: #ff938a; + background-color: #78191b; +} + +.hljs-addition { + color: #8ddb8c; + background-color: #113417; +} + +.hljs-link { + color: #96d0ff; + font-style: underline; +} + +@media (prefers-color-scheme: light) { + .hljs { + display: block; + overflow-x: auto; + color: #24292e; + } + + .hljs-comment, + .hljs-punctuation { + color: #6a737d; + } + + .hljs-attr, + .hljs-attribute, + .hljs-meta, + .hljs-selector-attr, + .hljs-selector-class, + .hljs-selector-id { + color: #005cc5; + } + + .hljs-variable, + .hljs-literal, + .hljs-number, + .hljs-doctag { + color: #e36209; + } + + .hljs-params { + color: #24292e; + } + + .hljs-function { + color: #6f42c1; + } + + .hljs-class, + .hljs-tag, + .hljs-title, + .hljs-built_in { + color: #22863a; + } + + .hljs-keyword, + .hljs-type, + .hljs-builtin-name, + .hljs-meta-keyword, + .hljs-template-tag, + .hljs-template-variable { + color: #d73a49; + } + + .hljs-string, + .hljs-undefined { + color: #032f62; + } + + .hljs-regexp { + color: #032f62; + } + + .hljs-symbol { + color: #005cc5; + } + + .hljs-bullet { + color: #e36209; + } + + .hljs-section { + color: #005cc5; + font-weight: bold; + } + + .hljs-quote, + .hljs-name, + .hljs-selector-tag, + .hljs-selector-pseudo { + color: #22863a; + } + + .hljs-emphasis { + color: #e36209; + font-style: italic; + } + + .hljs-strong { + color: #e36209; + font-weight: bold; + } + + .hljs-deletion { + color: #b31d28; + background-color: #ffeef0; + } + + .hljs-addition { + color: #22863a; + background-color: #f0fff4; + } + + .hljs-link { + color: #032f62; + font-style: underline; + } +}`; diff --git a/deps.ts b/deps.ts index fd7fdd7..709d3d5 100644 --- a/deps.ts +++ b/deps.ts @@ -46,6 +46,9 @@ export { renderToString } from "https://esm.sh/preact-render-to-string@5.2.6^"; export { marked } from "https://esm.sh/marked@4.2.2/"; +// export { default as highlight } from "https://esm.sh/highlight.js@11.6.0"; +export { default as highlight } from "npm:highlight.js@11.6.0"; + export { apply, type Configuration as TwindConfiguration, diff --git a/main.ts b/main.ts index af9d2fe..ea7a066 100644 --- a/main.ts +++ b/main.ts @@ -94,7 +94,7 @@ async function generateSite(opts: GenerateSiteOpts) { entry: entry, inputPath: inputPath, ignoreKeys: opts.config.ignoreKeys, - siteUrl: new URL(userConfig.url), + userConfig: userConfig, }) ), ...indexFileEntries.map((entry) => @@ -102,7 +102,7 @@ async function generateSite(opts: GenerateSiteOpts) { entry: entry, inputPath: inputPath, ignoreKeys: opts.config.ignoreKeys, - siteUrl: new URL(userConfig.url), + userConfig: userConfig, }) ), ], @@ -112,7 +112,7 @@ async function generateSite(opts: GenerateSiteOpts) { entry: entry, inputPath: inputPath, ignoreKeys: opts.config.ignoreKeys, - siteUrl: new URL(userConfig.url), + userConfig: userConfig, }) ), ]; diff --git a/markdown.ts b/markdown.ts index 45c1856..9367598 100644 --- a/markdown.ts +++ b/markdown.ts @@ -1,6 +1,7 @@ import { dirname, extname, + highlight, isAbsolute, join, marked, @@ -17,8 +18,8 @@ interface ParseOpts { text: string; currentPath: string; baseUrl: URL; + codeHighlight: boolean; isDirIndex?: boolean; - highlightCode?: boolean; } const toExternalLink = (href: string, title: string, text: string): string => @@ -81,7 +82,7 @@ const toInternalLink = (opts: { }; export const parseMarkdown = ( - { text, currentPath, isDirIndex, baseUrl }: ParseOpts, + { text, currentPath, isDirIndex, baseUrl, codeHighlight }: ParseOpts, ): { html: string; links: Array; headings: Array } => { const internalLinks: Set = new Set(); const headings: Array = []; @@ -155,11 +156,13 @@ export const parseMarkdown = ( } }; - // renderer.code = (code: string, lang: string): string => { - // const language = hljs.getLanguage(lang) ? lang : "plaintext"; - // const html = hljs.highlight(code, { language }).value; - // return `
${html}
`; - // }; + if (codeHighlight) { + renderer.code = (code: string, lang: string): string => { + const language = highlight.getLanguage(lang) ? lang : "plaintext"; + const html = highlight.highlight(code, { language }).value; + return `
${html}
`; + }; + } marked.use({ renderer, @@ -167,7 +170,7 @@ export const parseMarkdown = ( gfm: true, breaks: false, smartLists: true, - smartypants: false, + smartypants: true, xhtml: false, }); diff --git a/pages.ts b/pages.ts index 06addc8..fda3851 100644 --- a/pages.ts +++ b/pages.ts @@ -13,12 +13,12 @@ import { import { parseMarkdown } from "./markdown.ts"; import * as attributes from "./attributes.ts"; -import type { Crumb, Heading, JSONValue, Page } from "./types.d.ts"; +import type { Crumb, Heading, JSONValue, Page, UserConfig } from "./types.d.ts"; interface GeneratePageOpts { entry: WalkEntry; inputPath: string; - siteUrl: URL; + userConfig: UserConfig; ignoreKeys: string[]; } @@ -203,11 +203,12 @@ function getDeadlinks(pages: Page[]): [from: URL, to: URL][] { } function generateIndexPageFromDir( - { entry, inputPath, siteUrl }: GeneratePageOpts, + { entry, inputPath, userConfig }: GeneratePageOpts, ): Page { + const { url } = userConfig; const relPath = relative(inputPath, entry.path) || "."; const slug = relPath === "." ? "." : slugify(entry.name); - const pageUrl = new URL(join(dirname(relPath), slug), siteUrl); + const pageUrl = new URL(join(dirname(relPath), slug), url); return { title: entry.name, @@ -217,12 +218,13 @@ function generateIndexPageFromDir( } function generateContentPage( - { entry, inputPath, siteUrl, ignoreKeys }: GeneratePageOpts, + { entry, inputPath, userConfig, ignoreKeys }: GeneratePageOpts, ): Page { + const { url } = userConfig; const relPath = relative(inputPath, entry.path); const raw = decoder.decode(Deno.readFileSync(entry.path)); const slug = slugify(entry.name.replace(/\.md$/i, ""), { lower: true }); - const pageUrl = new URL(join(dirname(relPath), slug), siteUrl); + const pageUrl = new URL(join(dirname(relPath), slug), url); let page: Page = { url: pageUrl, @@ -235,8 +237,9 @@ function generateContentPage( const { html, links, headings } = parseMarkdown({ text: page.body ?? raw, currentPath: relPath, - baseUrl: new URL(siteUrl), + baseUrl: new URL(url), isDirIndex: page.index === "dir", + codeHighlight: userConfig.codeHighlight, }); page = { ...page, html, links, headings }; @@ -248,13 +251,14 @@ function generateContentPage( } function generateIndexPageFromFile( - { entry, inputPath, siteUrl, ignoreKeys }: GeneratePageOpts, + { entry, inputPath, userConfig, ignoreKeys }: GeneratePageOpts, ): Page { + const { url } = userConfig; const relPath = relative(inputPath, dirname(entry.path)) || "."; const raw = decoder.decode(Deno.readFileSync(entry.path)); const dirName = basename(dirname(entry.path)); const slug = relPath === "." ? "." : slugify(dirName); - const pageUrl = new URL(join(dirname(relPath), slug), siteUrl); + const pageUrl = new URL(join(dirname(relPath), slug), url); let page: Page = { url: pageUrl, @@ -268,7 +272,8 @@ function generateIndexPageFromFile( const { html, links, headings } = parseMarkdown({ text: page.body ?? raw, currentPath: relPath, - baseUrl: new URL(siteUrl), + baseUrl: new URL(url), + codeHighlight: userConfig.codeHighlight, }); page = { ...page, html, links, headings }; diff --git a/render.tsx b/render.tsx index a434cd7..7beb8d2 100644 --- a/render.tsx +++ b/render.tsx @@ -2,7 +2,7 @@ import { getStyleTag, renderToString, twindSetup } from "./deps.ts"; import twindConfig, { sheet } from "./twind.config.ts"; -import { HMR_CLIENT } from "./constants.ts"; +import { HIGHLIGHT_STYLE, HMR_CLIENT } from "./constants.ts"; import { Crumb, Page, UserConfig } from "./types.d.ts"; import Body from "./components/Body.tsx"; @@ -40,16 +40,20 @@ export function renderPage({ backlinkPages={backlinkPages && sortPages(backlinkPages)} relatedPages={relatedPages && sortPages(relatedPages)} pagesByTag={pagesByTag && sortTaggedPages(pagesByTag)} - navItems={userConfig.nav_links} + navItems={userConfig.navLinks} lang={userConfig.lang} author={{ - name: userConfig.author_name, - email: userConfig.author_email, - url: userConfig.author_url, + name: userConfig.authorName, + email: userConfig.authorEmail, + url: userConfig.authorUrl, }} />, ); + if (userConfig.codeHighlight) { + sheet.insert(HIGHLIGHT_STYLE, 999); + } + const styleTag = getStyleTag(sheet); const pageTitle = page.title === userConfig.title ? page.title From 833408eaafc87e749275f2bd5d1c2fefc1cc3ebc Mon Sep 17 00:00:00 2001 From: Gadzhi Kharkharov Date: Tue, 15 Nov 2022 11:48:03 +0300 Subject: [PATCH 2/3] use camelcase for config keys --- .ter/config.json | 9 ++- config.ts | 11 +-- deno.lock | 205 +++++++++++++++++++++++++++++++++++++++++++++++ docs/gfm.md | 16 ++-- docs/usage.md | 94 +++++++++++----------- feed.ts | 12 +-- types.d.ts | 9 ++- 7 files changed, 280 insertions(+), 76 deletions(-) diff --git a/.ter/config.json b/.ter/config.json index 8541541..368f513 100644 --- a/.ter/config.json +++ b/.ter/config.json @@ -2,12 +2,13 @@ "title": "Ter", "description": "A tiny wiki-style site builder with Zettelkasten flavor", "url": "https://ter.kkga.me/", - "author_name": "Gadzhi Kharkharov", - "author_email": "x@kkga.me", - "author_url": "https://kkga.me/", - "nav_links": { + "authorName": "Gadzhi Kharkharov", + "authorEmail": "x@kkga.me", + "authorUrl": "https://kkga.me/", + "navLinks": { "Usage": "/usage", "Source": "https://github.com/kkga/ter" }, + "codeHighlight": true, "head": "" } diff --git a/config.ts b/config.ts index 755655c..ea02f05 100644 --- a/config.ts +++ b/config.ts @@ -6,9 +6,10 @@ const defaultUserConfig: UserConfig = { description: "I am writing about my experiences as a naval navel-gazer", url: "https://example.com/", rootCrumb: "index", - author_name: "Your Name Here", - author_email: "youremailaddress@example.com", - author_url: "https://example.com/about-me/", + authorName: "Your Name Here", + authorEmail: "youremailaddress@example.com", + authorUrl: "https://example.com/about-me/", + codeHighlight: false, lang: "en", }; @@ -76,11 +77,11 @@ export async function createConfig( conf.renderDrafts = opts.renderDrafts; await checkUserConfig(conf.userConfigPath) - .catch(async () => { + .catch(() => { console.warn( `Config file missing, initializing default config at ${conf.userConfigPath}`, ); - await initUserConfig(conf.userConfig, conf.userConfigPath); + initUserConfig(conf.userConfig, conf.userConfigPath); }); try { diff --git a/deno.lock b/deno.lock index a2b990e..f6b30d7 100644 --- a/deno.lock +++ b/deno.lock @@ -243,6 +243,7 @@ "https://deno.land/x/deepmergets@v4.2.2/dist/deno/types/utils.ts": "4c540899d9cc8442d641ce63b4805772094a47724a4632c3a7af80d9027f8554", "https://deno.land/x/deepmergets@v4.2.2/dist/deno/utils.ts": "d46e181e249e28fb10885d499ab6f12a07c386d498c2e08376b1651a07a3a7a3", "https://esm.sh/feed@4.2.2": "d06750c1b5bd055f452ca28129001628c87b172539a6a64ef041a655c2e0712c", + "https://esm.sh/highlight.js@11.6.0": "d16f4f5b7b7acf6f02547ed64fa545c85a0d270b20ee70f4aa732867452c4fe9", "https://esm.sh/marked@4.2.2/": "d8aa7237a11099a1b44be9c9c66c1e974bd3bbc68405f741cce65904aec8bcf1", "https://esm.sh/preact-render-to-string@5.2.6^": "9b55fe19f1951780feeafa3e0f1f558f9c8d58df61c17faba27bcec0603326b5", "https://esm.sh/preact@10.11.2/jsx-runtime": "40654c7e9066221bab024d036ab828d9e9eb7ae0f386ace02d86c0cc8bb22ce0", @@ -267,6 +268,201 @@ "https://esm.sh/v98/feed@4.2.2/deno/feed.js": "aeb91a9dc25a2c53b7cd2c61eeae2309dffdcedb06126eaeacde847ce4d8d115", "https://esm.sh/v98/feed@4.2.2/lib/feed.d.ts": "357a8b7781477392f483aa71a581917b9689a32a4bce619dab46c458967c2394", "https://esm.sh/v98/feed@4.2.2/lib/typings/index.d.ts": "4f3fd1ad733a6114232de679b88dab76853b99ce7ae0803c35169494c9b42548", + "https://esm.sh/v98/highlight.js@11.6.0/deno/highlight.js": "ce00d51f5231ee9a77c6c35cfdbbddea2c52efe520553c7dcbf383601cc43476", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/core.js": "89fa8346cfec89c672243c81cc532195580ce4069f75332c851d1e2472fb2f21", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/1c.js": "b7f0289510523517eaf8544bcdce5c170726d6360290b5d802ebbc0959de2215", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/abnf.js": "c68bdf83fcaf523ec5e7ef4b6250c881a9b7086b05892c872b7bda9b2204a61f", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/accesslog.js": "e7e6d1b8debeff783e0153eda0d9dd76b0d98982001db2dd2be979091df0a2c3", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/actionscript.js": "e0bf257cb2b174701c7fb58558aab2468a72971cbe3eee5d75e368898d49add3", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/ada.js": "463ecfb6d12c4edc80b07b2c2607d7a1f5cd9f13b88934a973987f94d7172888", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/angelscript.js": "e177e990b02174db76684d7633cf7387a4802e567e013ab081d5649be4c85696", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/apache.js": "6c071d63f3b7391631cc8e2295425db6869fc837291834adec12d5991580ded9", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/applescript.js": "fab32b7b6b36a4c25439c9f4b0c27a51c7f22ba56ba6ffea3044407292acef03", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/arcade.js": "7f7df7fee2ffe8599e95036e222f3a1e5045d2395f51f7c100c0aba2cf76b245", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/arduino.js": "2dcae1ea0ebe0fff5251b35202cdcfa49ff88f7671da2c2cc729d3a5efa56d6b", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/armasm.js": "99e68bc9a88ff7d3c7859ea0b4324e4f47cdeeaa4bb46aa99454a33649aaf331", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/asciidoc.js": "a207c612923d2b24ad81edd654777008e0c22a4de01ec6785e01d8bd734bf78f", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/aspectj.js": "9a22792bf23313fabc01f1b33457ab0ec064d0d7c20661c42a5b46400f064c44", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/autohotkey.js": "ffc2389cad1901bb504403707612a35f70c5fb2bb087a28cdd2b57b9bb84a6fd", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/autoit.js": "7c66a3087b2110298b5f339ba6d375b3156c1f7b41f887422ac5a3130ea05834", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/avrasm.js": "80e8d85371edd519795236b1f5ec5ff975201cbfdf1fd3230da0d3f161c8c9c1", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/awk.js": "591c550d63226b18fb58b7cb874235b8707701d847d802048e18a110be4d9d74", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/axapta.js": "585877db5b7be9163eb496bc6e705851685e9eb6460675ea6d13d70040c366e5", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/bash.js": "640645ed5571e278c0755f5cd7254d3a320954653b8e3f380ce81da5b83986c9", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/basic.js": "391122c6ed3622bcd71d6e6f866dd35503c51c0c9bc9c150e380d83cfbf5d3c8", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/bnf.js": "676bccaa4cbb5288faf673c241a287feff56cf276076b58069ca64f581f4dbd3", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/brainfuck.js": "70b3daa58045748eeb88d7f465b4cba81b94e2dd31d50eea670afc04c180007c", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/c.js": "e938a56802cdbadf9200caee3ee23ff09dd676b2d759fc69c7795accee9f7568", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/cal.js": "69991562eb58dbd41eeeec31482eae3ac0e8d1cc46fd817a1cb00aae85b58cef", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/capnproto.js": "e9f8f46cabea6a321307ad9271aeee8081ae3a95bc852dd717f42803d32d32d4", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/ceylon.js": "946d51373ea3f995f4d984dbadfcba6cb01ea9b1e6ec73e3ced2af1a266fb524", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/clean.js": "72ef0c837e213e435e53ba5657644134c23ebd324eb736e29c4df1dfda01caef", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/clojure-repl.js": "4de49ff93d991a8e3a7db9680f7de8eb956263cb7c8de6a13f42f8104ef211f4", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/clojure.js": "dd7595179a16ada7eb43bb490890eec9a49511be596c6d71c5c561aa839b1b33", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/cmake.js": "f10eb22108fb54a4c5573bdc4378f948d971728915a184ef150093423f0aa062", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/coffeescript.js": "295a68087468b7b23e4dd0021b48c1afcc92d19c70bbd250e4c2cbeb6a219a9b", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/coq.js": "5842475b7786d02e3e396335494cd82e5289b44eba0683abd0a5b7b16dbc575c", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/cos.js": "f7324acac782f64124fd72d42ad874fcf4cd0a670e3c532b7381925ac0ddecee", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/cpp.js": "2e93c4ac118dbd71091cb45d086d8e3ef0d8e04b632930648c7cdebe943fb676", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/crmsh.js": "2c5f360771f6cd74fdd5c8746c5f52d43b9b25c7d5e190c4dcc42c2dd7ed1167", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/crystal.js": "9184173d9e6ff86167609c58dee62f5ab36f3eccf6a22602ac0b93769e398f33", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/csharp.js": "eac41cae150f276cf7d7550e98200bc7914513f7ac96e9f3367d8f86211c67d5", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/csp.js": "c396fa4220c9286c127dfee1796608e7913c4371d75568cbe45a97be98f696c9", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/css.js": "bfa66ee9ab6469dd95f292146949ef0b59c68619799b3705dad29585bdeef2ca", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/d.js": "af40ed37774ab2ecbf0b9ac793bc5958732a6cc743511bbffd997d468602c020", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/dart.js": "5acac630329c422ce95e8bb46b1b121b5fccc4aba659f43112ae73997c3d55b0", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/delphi.js": "87b9ccfd3ab51095ebceef0b1945660d02827921290e92c21b764301c3941685", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/diff.js": "77d3987a6dd3c8fb3eab023220500bf3899042bc8fa05d85081e88e6cd1758d3", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/django.js": "f7f43231eb2076e17531218363a2b51136e4012e06f3e214fef30a017a05cc1a", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/dns.js": "3a8b8cea0a4d808c85768c94073bf0db176b46b98f04c06b29f7f971c0e866f1", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/dockerfile.js": "6a0eaca267dd9fa74d9d1a0b6dbaeae17712188ab5a1f8583bdcf94b881e5940", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/dos.js": "c00eaa99dfb7ab0b26adb1642707ad0c78f9308e8117e121290ac7515316804e", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/dsconfig.js": "fe7390bd75e4214dc72e29934fbb8b469f79ea95e378ad1458af36c3f92b13c3", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/dts.js": "cc1617e4c9ff39bf5a2f920d21ae7305c242822b9a06cc778bda9e646bd79780", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/dust.js": "a092673081126ed7a4f43e56297bbb9b23921cfc2602fe1f1d1e38217444d4a3", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/ebnf.js": "d16af7aceed0307c10d871a58cbf739d482c0ddde112aa420a0836ae68dcc2d8", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/elixir.js": "429a8ad275d06cbc2b8f25d520600758f3c7d2d7197cc965881717f2a8d6d5ac", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/elm.js": "ae8f7cdc37998066fb08f7c024ee24abfbd745146fef350b60af064a4100df58", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/erb.js": "a62520bb8d7a925e19d00d990ed46e84975284a95172764eacdd725f5bef8392", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/erlang-repl.js": "19a4cb07b183c3c6b96dbc4584a20b8d006b3ad07ea089ddcd1b6f35c3b76f39", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/erlang.js": "74ee577f6fc014fe434ae04bb7ea3fe38532d5d2ad131b969315a6d2d7eb9732", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/excel.js": "083a687bf1d9046f66e83329e22d1eec195f573915ab044c09870e1250a2a374", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/fix.js": "a1b4046c75f74ff53cd12bf10068acb158e28d8b21971548a5096873b6e1811b", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/flix.js": "42c19e955fd071918bb3162fb772787931e718122296fc9d22120d1a91756902", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/fortran.js": "c75ce8505bbefba8db31232ccdef2f9ae8ac678b1c2b3adaa67e66896e4632e1", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/fsharp.js": "9f379987dc648f455468f97bc05316919ed7b7d2af064d4846bd27a36e948b25", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/gams.js": "9f6d934d9d9e8e7e40000b8e966e952ea424a16ed2442b341f19f1ee15e63339", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/gauss.js": "edab4c7649e2c40028d8f1634d11d72f3a0606b5d79f3de5e194b4792e4a5c03", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/gcode.js": "3764b07301ec03e86353789e23e53f846448161888941830f4130e25b6d2d75e", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/gherkin.js": "7c75e4ba0e6daad4b6d68c5878f96e2b5a248d93955eaa3408a049efd140af72", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/glsl.js": "a1e53d0e360e8a0b21d733df2471e92ae1c99b4b1f3892395fcbcfee349d5d22", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/gml.js": "1b3a86a8170959a1ce9c2e932628a8eaa8f01fab658ef20b31a62b21fc6b9f16", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/go.js": "efb0dfeef71b7f5b2bcb7737f8b15ee963b7a4697f0cc3d00cbf76f03bca09e6", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/golo.js": "7396b9fe2e55453af8c3a00a06de99475a0026923ca5ffbbef0d1d93695a6b30", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/gradle.js": "218d8d7de1d2de86019aebf06e323c1c7a212851bfb28b44efb1f8b3999dbb63", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/graphql.js": "118c2961c812aa50f5809b1cebdf0df7009941b0d1dc2ed7f7c15776f5699365", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/groovy.js": "1db63739d84fa4437b8fced71e7ce945cac58b793954d102963f3ec07ec76245", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/haml.js": "d7f67f971604d3a1ed233df1314ee350a4cc4136f580e2aa8a112949719905b2", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/handlebars.js": "c14162aab0e45eec01e543d07253473415d3a680ccbdcab9f65915ee982aaa2c", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/haskell.js": "675b0cf4c5b226a5848dad42f95481fc8c6df29d79b2917cdb6f366b8446a1d8", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/haxe.js": "78df341eb9d258b9c5253e7193ef2b620fa7b44d41dbf663aac5522dc7fe4922", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/hsp.js": "9ce38133700c0e5cc4e189abd19db57b65ae42a4b39d1f1a6df9b9fc0294f570", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/http.js": "ccdd57bf93ced86d852845703d29357697e9f96923566b31d16d4d55fe6304da", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/hy.js": "d0eabec039d934797f9c263399710f265cc1d4267fc7bccde9f532ced0082e37", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/inform7.js": "38720b0c003f01ffb4f4e109c7c84cf4c719103c23ecd11d362b60ba10907164", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/ini.js": "1ff36a1f6cc9e360aeadc7a00519e1b26cb6ad9a19f10291b69eee398c007a97", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/irpf90.js": "21a5508330c4c9aca48b8743e8aa9054dee1ae7be5dbae877d0f563b0ddf4a37", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/isbl.js": "fda30bc79fd6bf8c4d9e829c2eda04222795857b117999b7b2df476670c744f1", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/java.js": "2ce37a0e607dc8e0a4c8cd7840ffb65200210bc6c18a28fbddf93a211d8c621b", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/javascript.js": "a4ca7df7eae5b48e41613cfbecfd1ac4e295e9b9ef5837bca45e6ca38c858dbd", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/jboss-cli.js": "580e6863bd25776e085393cb27772d9ee0e26e407d0b9c231de8e4f0395c61dc", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/json.js": "dcd8f34f2486956614255297654e25066f0d18f30073be2a70da61d1f6f58593", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/julia-repl.js": "50977ad27563cad7dbddb8af3bb70151921f3aff6ef4f48c7411b21f359295a7", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/julia.js": "64bf521427a6a3ce762a04c2af84893dc4ae988aeb4966997f5811e226dc4328", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/kotlin.js": "3e9201e8002351766c50e1953b5036fc240c9745186b33968042accf804c5460", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/lasso.js": "b7254e56ff3f07b39b8d8295851652beaec7db09da3870467c681cfdea214840", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/latex.js": "e445bd2f22abb096947af669dfaa1a96db7486a233586846075e0cde230d7516", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/ldif.js": "a16be381d861d91dabf037cb226ab8245cb70868c0b7d931be47d57eff6303e7", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/leaf.js": "363adf48e6ace1364589251cd2e4d97fd3c8799adadb1d66574ca6f2e5a9511d", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/less.js": "a43ec5b98234e73932c0ccb5d1c3f87a60c431aa9396ce70f40e9d4432ea3843", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/lisp.js": "b673aae4dd6c5b96f48b260c5980d86fce73eec03872d6d53df7443d5007d9b3", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/livecodeserver.js": "3a54f1d322d04ce7f6243349d5b1217856c9e1b13ad4087d1a4eac3bd1c5aa24", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/livescript.js": "b88a2ea2b61ac1e9fe8f6f4592c75e2875b7d328787f380f210f2bb084b4d326", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/llvm.js": "c949a9e3e1e8d2118cd933021e0ae972eb45485acbbed997fb8b62e7bee6cbbd", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/lsl.js": "0adfeb20bbd9e6134811b9cf44e2027ba8bb70c136e535edef74976f7ec9f24c", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/lua.js": "60b42b857be605476ceee53cd5f72169783ada2bd51e7811ae2ae96d7988bef1", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/makefile.js": "acfae657d1345fe83fb1b696b63b3cbb2e9d7ad8a34eccaa80efc2ac6c183d7b", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/markdown.js": "c3592f15501d36a3a0f2673c32a4a42933dcf888d3206ba533b26e34956d0cb5", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/mathematica.js": "5a094d16f63193d991abf90ea83d85b8aab39cf14c8969e263e1fc058e371ed3", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/matlab.js": "00004edfef4c844ce962fef0948a5146283ae52cd9a0c7cb98d5bc90f255d533", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/maxima.js": "26256a9e7c7e29ca60a2c147a77b840dd7a77debe9fa4f1af17f8c67fa76e2db", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/mel.js": "b9100d1d451730e64071bbbe588fbd2f354e9aba7859ef0643158991a4b09d92", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/mercury.js": "7a8751a52e11d2be8abb76a772b18fa0f3862f62c9911272ee95fc238bafb8a4", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/mipsasm.js": "ed4923268c8e6511fb46954784ebca71eecc17d823e76feec086aa9c8c26f1f1", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/mizar.js": "97485ef331c66bf759d2f9e546207101e01ff5dcc5b0f636d6e82acc41747c91", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/mojolicious.js": "0aebd32c10db6447722cf622cd47dda712ee5ebe94fe3e983369ba148a7d441a", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/monkey.js": "167027fccc965594d01963a629f05f0d9b689c6210970df413b0df293d43cbb7", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/moonscript.js": "54906f393d126c9654137c909f92c9c27ae139b36c611ec51be89b87663fc135", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/n1ql.js": "5c8241a4d35d5a4026e56f4627d9a61a10249f28c8d2d296e4b853b96343e22b", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/nestedtext.js": "0734b4815768d470b76e673b80ae123022f073ffc201b39ae88a244e02bdf496", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/nginx.js": "1f2a708c817da0bd6320f2bf7f01689f8825cc89aca364e861edd5d916537276", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/nim.js": "ab70ed2623f2d3d873be01aae301e7c440b108dc7ada5d354845d0ce97f888c6", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/nix.js": "c028148b96989699f9992b540bb1f85e82a34c4b76cf43fa5545292bf641b8bc", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/node-repl.js": "183b41c3e27d1c090a51fa622467d5848476f1542981edc8a4b4525d9cff711b", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/nsis.js": "7a54919a3f02fd1cd2d6d18d3e4412de8c838f8a871732f86ba2f1430284628d", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/objectivec.js": "b7004c319526d9417d9c82a5b3c2d360ed68fdf5e542e4fe50ae27c5a1f6cab3", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/ocaml.js": "a5ccecdce3722420e046c4f1b046668a00daf910c0fcce8ff682b30209310345", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/openscad.js": "e25c3a939f099456ccde62fff28b5b0f9abacb3db081cc1186a6b961a3f2d40b", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/oxygene.js": "a3b5a03f418316ab2bc380a75404e2a3086d0ef1061db2a64995a223d9598931", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/parser3.js": "eb6de15e561f9001ea0dec5f734aece26ff6c35f89351059a22ef6acb088dd5c", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/perl.js": "0f41e268a37e6b42ae1164e9c80127ad412fa3e4071bba4c619437c33f7169ed", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/pf.js": "70c2f725c6737d7de476b380c96b5610d1f62f8b131a6965e5c67a6024b1bf0c", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/pgsql.js": "5a2f51766c4138612ebb18d96b9c598ba72d0885c764665862ab07fca271dcc6", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/php-template.js": "7c0bf0b6daa1b1bae7e259b7b095303a4066e4c42f945a3a33d22c065d4c9530", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/php.js": "99bdfc8ac4b24ed6131883800f3cbcf9d738e3d5ac30c691264b68cd417f3564", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/plaintext.js": "84011fc210784c07f4d5ae55a0c17d9fac9dd1f032eb058c785e9098c0f22588", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/pony.js": "36a3e9a3ca077ab4953db74e0b6bb3b24be2584b08edff0742ca544fea6b0489", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/powershell.js": "5c928d2f28941c3d99d01d556802602b0e8aae469e637a516d2d43061ce775ae", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/processing.js": "53a34a15ff3f60c69aef1a7e56f7ddbbe4fb874ec6c839d61156a77a7ab07167", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/profile.js": "dfa1c968d890c3efea8f0aeb3c3e67b7e1295ea4724b9cb325380bea749a2af6", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/prolog.js": "cbe3b893d4c5ba26902b3311c4bddc1f9e5f1aa4af8a9073b63ac384dac0eb09", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/properties.js": "985d7f3e5421df4b0866e24ce7db85e197678dd8ba106b6d6304773881cd7243", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/protobuf.js": "1e2ef9b5634cf61877597c1347aec00c9c297f6b509f3dee85ab3ee5c57b7401", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/puppet.js": "968cbff1d7ea5ac62efa8e4d0a14e9f9590c2a4a6c7686a39ad7354171abbab6", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/purebasic.js": "13b73909467f97355f4b6e412d717dfabf77f2192c8ac28d62695b8538382e8a", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/python-repl.js": "0a27b97f47a7410d846f6bba4b5cb02045bf7e142fb9ad2251f60bac68a75057", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/python.js": "8b50aee0675f3066403c4d0efc3a30c3c219f9d9d28e15d11d4e9ff0f3bb7a12", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/q.js": "0d14f8fc56ecac55dfec1a7ae5746ecc4b9e685d611408ea989f8e3af9ccb843", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/qml.js": "6794941bc48aedefd080d98d381105acd13e3acc6d098430c53aaa8b72428221", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/r.js": "6f11c6d94d34d7ba1dd53f9a23190ad45fa2c444ff8671c44fc1827dd2ca1799", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/reasonml.js": "603b21b21f0e8e1a5fc667765e0a016a5daac06d9257d11071e74648d4d9247d", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/rib.js": "4738d6f6d35544ebe49d732ef678256edc8149380e5fb2fdab7fecb41db8b438", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/roboconf.js": "ce5c4a7f3fb97ea4c624bd541cbe41947a94d2dd02edab0f227a6cf90b414568", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/routeros.js": "aa86ab84b987a3b6580a0c7b87a6544b83014e2f84f3889b57fd5f38c753e67d", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/rsl.js": "186e7f61333a320d8e80d55941f561c0885985edac72739f5a00762ab0d60664", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/ruby.js": "a05aeb3b627b2d3444926c0145c374958618355127bcba0b19499826610d79b9", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/ruleslanguage.js": "60ef03a2ab923e63c464d91b1b824c8a0cda5658bfe9f9a4b26d8316373fff02", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/rust.js": "a88a557392ed5f5b0c5372eb4527b97510dcd72403f3c8d043dcab6d00ec68b6", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/sas.js": "b81ffba9a331bd7c5a506d2e5ee5ad1e7d465bac5dc0baaf71d398cddc5cc5ff", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/scala.js": "0357beb5c10f8d30045f2a7a111055ed80b431256ba77e3c6461c1bedc3809b2", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/scheme.js": "245a54943db5385fbbd003c77a8e246384aedfafcf9f6e21ed2a15f4522cf326", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/scilab.js": "0d9cbda787aeea1fbebdb64e1317aeeeea26f62d0b30ad3de65ef4370a8d20ee", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/scss.js": "9e65fe5e9ff89eaf77d4f7e37151d178f2bded3ebe90cba3c69741203fccfc5b", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/shell.js": "920abf5c2e7052cce8482beeac83be2fae9297e3efdc6e938c36a99c0865e147", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/smali.js": "7b261c9a4b7595a2dc012a31c0bfb6d9d3dc9d51497f2a4e626aadef5b288c7e", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/smalltalk.js": "88726d4bc9ef94282cf75393f007ea85f77146bc5dfe93ae270b0b6ac258c892", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/sml.js": "44205092300c39e2c328475d49d69df15f1248ad133a4abffc42c2442805ba51", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/sqf.js": "3bc52ca6edd51634c3a15114dedfa747756459409e255811da102a22e0b2cda3", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/sql.js": "7214f4444195aac0e38e5851c5607bbfeb50ddf71dde09ce5534144374abdbb6", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/stan.js": "0436c399f3625fffd5cefa536e5754578cd735a46959c39f6eb78e4204985ddb", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/stata.js": "4f5e09a729f2a6379ef1fcbeb93acce95599ce00826b2351f6f7a53be3d48738", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/step21.js": "b455227e8d9665399ee532d91bec9e2a5bfde3698446c4b92bc3dc10bf192db2", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/stylus.js": "2eb1606710bfaac1caeef1565733fc7a69031f454faf15cf7f1f4e1f508d28d4", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/subunit.js": "7a17968daa3e79fb3ae4db248e8e0461ae998051581d26034ba4590d74c3e566", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/swift.js": "bae89f7da82f3840012e7391a8152cd87717354e151118e0ab85b23f333af4aa", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/taggerscript.js": "10b7d22bc2203e42d520e91fe2ae7a64e47fdce25a4e6a4011683b09888df7bc", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/tap.js": "296b46498a6eddf006e015accc5df4e28b675e873979de55e108f4d2eb6c0dfd", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/tcl.js": "b744937098e22b3c3f8bc52cf1e3dc31e6210ec93b35c6590dda89a7d0906e69", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/thrift.js": "3a3c7fae0c490dfc5c1ee121d3976d021750de3761895f9dab6419b0690ef491", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/tp.js": "ec3551ae6ab7fd7de92b1295bed3d4b3089157cc3da1283786c0d8b62dea9ef1", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/twig.js": "04e9ea3f3e265cdb7d6de8c49d608257459fc5376f2884b9ede42c6cc8e6b330", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/typescript.js": "605dc2bc4c7e4f4adba141ffb88ba2e445ffb07c8fa536631cc5b882017de791", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/vala.js": "5bfd32de6f50732ec8e2c48ee46ffae8398f25b2404785518649dea3654e094d", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/vbnet.js": "a05662c24aace86a05a72871dcdd23a222f675f27617f70f91b559cb773fb2c5", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/vbscript-html.js": "4ca5d4e6b716400cab28b8729e4a95c91b9ce0d312056f7e49ff52cd3fbc095f", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/vbscript.js": "437d71cc2c284d96f98ffefd8647118696c0d788a35d55aabc8958251da447d1", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/verilog.js": "657749e9e0b95716bf3227ddc615c01368578359f682039a9c96707f7b69fa67", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/vhdl.js": "1eb743f5a07994ede86eca8e25166e4f972bf1ee12870d3213ec941f601b55f5", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/vim.js": "6a19cf0d7d66e995d58cefb7e0ca4ab8c8168b305aceea70bc175fac131ff5b7", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/wasm.js": "f0fb532c9d440dfe0243112a230c986699e1c8d6143bbae01c72641e4ce88f10", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/wren.js": "641e0b6ba560f96517c0e5661818dd977b1c9a67abc122cfb5fe41472196345c", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/x86asm.js": "24bb06bb8bd5833a3befd04720ec0ab5fbe62c8e26211e0bc482e04ad95f5db1", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/xl.js": "9ea6da98a6addbaf39935f54f117386b94fd0db736a858c02287dbdee6f5295c", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/xml.js": "69752f6ae85ef877a706460ebbaed6f4cd645d995aefed602b5795b32b21657b", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/xquery.js": "025b31313779e3520b755994588e3869d84c57088cd49a73fb117ff59a6c73ec", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/yaml.js": "3b11053f567ad8d8765457d8400d05597621cfe1812a26ca0d3fca409065b025", + "https://esm.sh/v98/highlight.js@11.6.0/deno/lib/languages/zephir.js": "5324eee32400866e2bf3b5803dac8766f9b308d4318af973638a15dd34cf7fc9", + "https://esm.sh/v98/highlight.js@11.6.0/types/index.d.ts": "e70dd5f565b1e3ae1e7bf24d5419ca2c89fae3ae4bff8cb7fb90470dbcbc9229", "https://esm.sh/v98/marked@4.2.2/deno/marked.js": "770cd4aefb1082c806bcd879050caabcbe6c48eac332384fdf347c990a0e254e", "https://esm.sh/v98/preact-render-to-string@5.2.6/deno/preact-render-to-string.js": "0554ba3b539a1fd09d6f751b2b0ad54fddf4fbf6c76386a02c6407c01ab1653d", "https://esm.sh/v98/preact-render-to-string@5.2.6/src/index.d.ts": "207fabb65c9b47c4afd60520c36eb5a7564a4ce4f9c23a45f44b571ad199f2fc", @@ -288,5 +484,14 @@ "https://esm.sh/v98/ufo@0.8.6/deno/ufo.js": "c220badd66c162b92260e3e370a89eb1f9dba1df3f879bb65f5fffbd8cd34169", "https://esm.sh/v98/ufo@0.8.6/dist/index.d.ts": "c4591e29773354617e1955af9e055a0070e73e70ec25a0bcedfeeca06692e6f3", "https://esm.sh/v98/xml-js@1.6.11/deno/xml-js.js": "7cc22400680005b03e28f77b84bd87bc5c613c15424852992261dd23fcd7ec3e" + }, + "npm": { + "specifiers": { "highlight.js@11.6.0": "highlight.js@11.6.0" }, + "packages": { + "highlight.js@11.6.0": { + "integrity": "sha512-ig1eqDzJaB0pqEvlPVIpSSyMaO92bH1N2rJpLMN/nX396wTpDA4Eq0uK+7I/2XG17pFaaKE0kjV/XPeGt7Evjw==", + "dependencies": {} + } + } } } diff --git a/docs/gfm.md b/docs/gfm.md index 7442492..36086e9 100644 --- a/docs/gfm.md +++ b/docs/gfm.md @@ -62,12 +62,6 @@ This is a code block following a header. | A table | A header | | A table | A header | ---- - -There's a horizontal rule above and below this. - ---- - Here is an unordered list: - Salt-n-Pepa @@ -106,6 +100,12 @@ And a nested list: - Donatello - Raphael +--- + +There's a horizontal rule above and below this. + +--- + Definition lists can be used with HTML syntax.
@@ -149,8 +149,6 @@ If a table is too wide, it should condense down and/or scroll horizontally. | Prince | Purple Rain | 1984 | Warner Brothers Records | Grammy Award for Best Score Soundtrack for Visual Media, American Music Award for Favorite Pop/Rock Album, American Music Award for Favorite Soul/R&B Album, Brit Award for Best Soundtrack/Cast Recording, Grammy Award for Best Rock Performance by a Duo or Group with Vocal | Let's Go Crazy, Take Me With U, The Beautiful Ones, Computer Blue, Darling Nikki, When Doves Cry, I Would Die 4 U, Baby I'm a Star, Purple Rain | | Beastie Boys | License to Ill | 1986 | Mercury Records | noawardsbutthistablecelliswide | Rhymin & Stealin, The New Style, She's Crafty, Posse in Effect, Slow Ride, Girls, (You Gotta) Fight for Your Right, No Sleep Till Brooklyn, Paul Revere, Hold It Now, Hit It, Brass Monkey, Slow and Low, Time to Get Ill | ---- - Code snippets like `var foo = "bar";` can be shown inline. Also, `this should vertically align` ~~`with this`~~ ~~and this~~. @@ -202,8 +200,6 @@ Inline code inside table cells should still be distinguishable. | Javascript | `var foo = "bar";` | | Ruby | `foo = "bar"` | ---- - Small images should be shown at their actual size. ![Bridge](img/img-small.jpg) diff --git a/docs/usage.md b/docs/usage.md index 913a2a4..95aaf6f 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -22,20 +22,20 @@ Navigate to a directory with some markdown files and run Ter to build a site. This command will recursively search for all `*.md` files in the current directory and generate a site into the `_site` directory: -```sh +``` deno run -A --unstable https://deno.land/x/ter/main.ts ``` If your markdown files are not in root directory, or if you want a different name for the output directory, adjust accordingy, for example: -```sh +``` deno run -A --unstable https://deno.land/x/ter/main.ts --input pages --output _dist ``` To start a local server with live refresh, pass the `--serve` flag: -```sh +``` deno run -A --unstable https://deno.land/x/ter/main.ts --serve ``` @@ -43,11 +43,11 @@ deno run -A --unstable https://deno.land/x/ter/main.ts --serve Run Ter with the `--help` flag to see usage reference. -```sh +``` deno run https://deno.land/x/ter/main.ts --help ``` -```sh +``` Ter -- tiny wiki-style site builder USAGE: @@ -73,18 +73,19 @@ building. ### Options -| Key | Description | -| -------------- | --------------------------------------------------------------------- | -| `title` | Title of your site. | -| `description` | Description of your site. | -| `url` | Published URL address of your site. | -| `rootCrumb` | Label used for root crumb label (default: "index"). | -| `author_name` | Your name. | -| `author_email` | Your email. | -| `author_url` | Your home page. | -| `lang` | Optional. [Locale][locale] used for formatting dates. | -| `nav_links` | Optional. Object of navigation links in form of `{label: path, ...}`. | -| `head` | Optional. String to inject at the bottom of `` tag. | +| Key | Description | +| ------------- | --------------------------------------------------------------------- | +| title | Title of your site. | +| description | Description of your site. | +| url | Published URL address of your site. | +| rootCrumb | Label used for root crumb label (default: "index"). | +| authorName | Your name. | +| authorEmail | Your email. | +| authorUrl | Your home page. | +| lang | Optional. [Locale][locale] used for formatting dates. | +| navLinks | Optional. Object of navigation links in form of `{label: path, ...}`. | +| codeHighlight | Optional. Use syntax highlighting in code blocks (default: false). | +| head | Optional. String to inject at the bottom of `` tag. | [locale]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument @@ -92,16 +93,17 @@ building. ```json { - title: "Your Blog Name", - description: "I am writing about my experiences as a naval navel-gazer", - url: "https://example.com/", - rootCrumb: "index", - author_name: "Your Name Here", - author_email: "youremailaddress@example.com", - author_url: "https://example.com/about-me/", - lang: "en", - nav_links: { "about": "/about", "contact": "/contact" }, - head: "" + "title": "Your Blog Name", + "description": "I am writing about my experiences as a naval navel-gazer", + "url": "https://example.com/", + "rootCrumb": "index", + "authorName": "Your Name Here", + "authorEmail": "youremailaddress@example.com", + "authorUrl": "https://example.com/about-me/", + "lang": "en", + "navLinks": { "about": "/about", "contact": "/contact" }, + "codeHighlight": true, + "head": "" } ``` @@ -142,7 +144,7 @@ pages. Ter extracts [YAML frontmatter](https://jekyllrb.com/docs/front-matter/) delimited by `---` from markdown files. Here’s an example: -```markdown +```yaml --- title: My page description: Here’s my description @@ -154,28 +156,26 @@ property: value --- ## My content - -... ``` Some properties are utilized when building a site. All of them are optional. -| Property | Default | Description | -| ----------------- | ------- | ------------------------------------------------------------------------- | -| `title` | | page title | -| `description` | | page description | -| `tags` | | page tags | -| `date` | | page publish date in YYYY-MM-DD format | -| `dateUpdated` | | page last update date in YYYY-MM-DD format | -| `pinned` | `false` | page is listed at the top of [index lists](#index-pages) | -| `unlisted` | `false` | page is excluded from all index lists | -| `draft` | `false` | file is [ignored](#ignoring-files) during site generation | -| `log` | `false` | if set on an index page (`index.md`), all child pages are rendered inline | -| `toc` | `false` | affects rending of table of contents | -| `showHeader` | `true` | affects rendering of page header with title, description, date and tags | -| `showTitle` | `true` | affects rendering of page title | -| `showDescription` | `true` | affects rendering of page description | -| `showMeta` | `true` | affects rendering of page date and tags | +| Property | Default | Description | +| --------------- | ------- | ----------------------------------------------------------------------- | +| title | | page title | +| description | | page description | +| tags | | page tags | +| date | | page publish date in YYYY-MM-DD format | +| dateUpdated | | page last update date in YYYY-MM-DD format | +| pinned | false | page is listed at the top of [index lists](#index-pages) | +| unlisted | false | page is excluded from all index lists | +| draft | false | file is [ignored](#ignoring-files) during site generation | +| log | false | if set on an index page (index.md), all child pages are rendered inline | +| toc | false | affects rending of table of contents | +| showHeader | true | affects rendering of page header with title, description, date and tags | +| showTitle | true | affects rendering of page title | +| showDescription | true | affects rendering of page description | +| showMeta | true | affects rendering of page date and tags | ## Ignoring files @@ -196,7 +196,7 @@ deno run -A --unstable https://deno.land/x/ter/main.ts --serve --drafts Ter automatically finds non-working internal links and lets you know about them after building a site. Here's an example output: -```sh +``` [...] Dead links: /overview -> /non-existent-page-name diff --git a/feed.ts b/feed.ts index b3c6ab0..34c12a8 100644 --- a/feed.ts +++ b/feed.ts @@ -13,9 +13,9 @@ export function generateFeed(opts: FeedOpts): Feed { description, url, lang, - author_name, - author_email, - author_url, + authorName, + authorEmail, + authorUrl, } = userConfig; const feed = new Feed({ @@ -31,9 +31,9 @@ export function generateFeed(opts: FeedOpts): Feed { atom: `${url}/feed`, }, author: { - name: author_name, - email: author_email, - link: author_url, + name: authorName, + email: authorEmail, + link: authorUrl, }, }); diff --git a/types.d.ts b/types.d.ts index 04a8fc3..0eaca3b 100644 --- a/types.d.ts +++ b/types.d.ts @@ -3,11 +3,12 @@ export interface UserConfig { description: string; url: string; rootCrumb: string; - author_name: string; - author_email: string; - author_url: string; + authorName: string; + authorEmail: string; + authorUrl: string; + codeHighlight: boolean; + navLinks?: Record; lang?: Intl.LocalesArgument; - nav_links?: Record; head?: string; } From 61b5d6ae3460ddcee4c42fcaff1dd260f03d00b8 Mon Sep 17 00:00:00 2001 From: Gadzhi Kharkharov Date: Tue, 15 Nov 2022 11:50:57 +0300 Subject: [PATCH 3/3] disable highlighting in config, remove nav links --- .ter/config.json | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.ter/config.json b/.ter/config.json index 368f513..fbe09d5 100644 --- a/.ter/config.json +++ b/.ter/config.json @@ -5,10 +5,5 @@ "authorName": "Gadzhi Kharkharov", "authorEmail": "x@kkga.me", "authorUrl": "https://kkga.me/", - "navLinks": { - "Usage": "/usage", - "Source": "https://github.com/kkga/ter" - }, - "codeHighlight": true, "head": "" }