diff --git a/app/digital-garden/[slug]/page.tsx b/app/digital-garden/[slug]/page.tsx new file mode 100644 index 0000000..9bf76e8 --- /dev/null +++ b/app/digital-garden/[slug]/page.tsx @@ -0,0 +1,102 @@ +import { StyledArticleContent } from 'components/styled-article-content' +import { notFound } from 'next/navigation' +import { allSeeds, Seed } from '.contentlayer/generated' +import { Metadata } from 'next' +import Link from 'next/link' + +type Params = { + params: { + slug: string + } +} + +export const generateStaticParams = () => [] + +export async function generateMetadata({ params }: Params): Promise { + const seed = allSeeds.find((seed: Seed) => { + return seed.slug === params.slug + }) + + if (!seed) throw new Error(`Seed not found for slug: ${params.slug}`) + + const title = `${seed.title} - Garden - Chris Jarling` + const description = seed.body.raw.slice(0, 150) + + return { + title, + description, + openGraph: { + title, + description, + images: [ + { + url: 'https://www.chrisjarling.com/og.jpg', + secureUrl: 'https://www.chrisjarling.com/og.jpg', + width: 1200, + height: 630, + }, + ], + }, + } +} + +function getBacklinks(slug: string) { + const backlinkingDocs = allSeeds.filter((seed) => + seed.body.raw.includes('[[' + slug) + ) as Seed[] + + return backlinkingDocs.map((doc) => ({ + title: doc.title, + slug: doc.slug, + excerpt: doc.excerpt, + type: doc.type, + })) +} + +export default async function Post({ params }: Params) { + const seed = allSeeds.find((seed: Seed) => { + return seed.slug === params.slug + }) + + if (!seed) { + notFound() + } + + const backlinks = getBacklinks(params.slug) + + return ( + <> +
+

+ {seed.title} +

+ {seed.wip && ( +
+ This page is still work in progress. Information might be + incomplete, formatting and grammar might be off. +
+ )} + + {backlinks.length > 0 && ( + <> +

Backlinks

+
+ {backlinks.map((backlink) => ( + + {backlink.title} + {backlink.excerpt && ( + {backlink.excerpt} + )} + + ))} +
+ + )} +
+ + ) +} diff --git a/app/digital-garden/page.tsx b/app/digital-garden/page.tsx new file mode 100644 index 0000000..291aa74 --- /dev/null +++ b/app/digital-garden/page.tsx @@ -0,0 +1,32 @@ +import Link from 'next/link' +import { allSeeds, Seed } from '.contentlayer/generated' +import { format } from 'date-fns' + +const DigitalGardenIndexPage = async () => { + const sortedSeeds = allSeeds.sort((a, b) => { + return new Date(b.updatedAt).getTime() - new Date(a.updatedAt).getTime() + }) + + return ( + <> +
The garden
+
+ {sortedSeeds.map((seed: Seed) => ( + +
+ {seed.title} + {seed.excerpt && ( + {seed.excerpt} + )} + + Updated at: {format(new Date(seed.updatedAt), 'do LLL, yyyy')} + +
+ + ))} +
+ + ) +} + +export default DigitalGardenIndexPage diff --git a/app/layout.tsx b/app/layout.tsx index ad3e5ca..8e71b1c 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -2,14 +2,22 @@ import Header from '../components/header' import './prism-atom-dark.css' import './tailwind.css' import './global.css' -import { Nunito, Literata } from 'next/font/google' +import { Nunito, Literata, Playfair, Fira_Sans, Rufina } from 'next/font/google' import { Metadata } from 'next' import Footer from '../components/footer' -const nunito = Literata({ +const bodyFont = Fira_Sans({ subsets: ['latin'], display: 'swap', variable: '--font-main', + weight: ['400', '700'], +}) + +const playfair = Fira_Sans({ + subsets: ['latin'], + display: 'swap', + variable: '--font-title', + weight: ['400', '700'], }) export const metadata: Metadata = { @@ -45,7 +53,7 @@ export default function RootLayout({ children: React.ReactNode }) { return ( - +
diff --git a/components/header.tsx b/components/header.tsx index 61a44b4..621900a 100644 --- a/components/header.tsx +++ b/components/header.tsx @@ -8,6 +8,7 @@ export default function Header() { Home Posts Notes + Garden
diff --git a/content/garden/streams-pages.md b/content/garden/streams-pages.md new file mode 100644 index 0000000..76ab22a --- /dev/null +++ b/content/garden/streams-pages.md @@ -0,0 +1,19 @@ +--- +title: Streams vs Pages +wip: true +createdAt: 2023-08-12T20:24:21.048Z +updatedAt: 2023-08-12T20:24:21.048Z +excerpt: "Thoughts about writing content in form of streams of thoughs or pages" +--- + +Most content on my site is in stream format: I write it once and then do not come back to it. Works good for log-like entries. It does not work well for opinions (which I tend to change over time) and knowledge (which I tend to acquire more over time). I think it makes sense to orient my site more towards pages. + +I want to keep the stream part of the site around (term is stolen from Timo's site) for log-like entries. They could also be the starting point of some pages. However, there is no reason why pages should not be the starting point for pages and then there is just a stream of changes to pages. I don't write too many personal things on here lately anyways. + +I'm afraid that moving the main content of my site to pages will again give me the feeling that things need to be polished. Even though the idea of moving to pages should be just the opposite: Write early and iterate on ideas when they involve. Can also have different states displayed on it to communicate its state. + +Not sure what the states could be. There are two that I'm certain of: +- Still working on it +- Done + +Of course, even if it feels like a note is "Done" today, this can be fals in a week or a year. So these states should not communicate that a page is now set in stone. It should rather comminicate that a page is mostly a rough outline (like this one now is) to the reader. Considering that, pages only need one state, which is "Work in Progress" and can be a small indicator at the beginning of the page. diff --git a/contentlayer.config.ts b/contentlayer.config.ts index c6fb5f0..225a2de 100644 --- a/contentlayer.config.ts +++ b/contentlayer.config.ts @@ -1,5 +1,10 @@ import { defineDocumentType, makeSource } from 'contentlayer/source-files' import rehypePrism from 'rehype-prism-plus' +import rehypeStringify from 'rehype-stringify' +import remarkFrontmatter from 'remark-frontmatter' +import remarkParse from 'remark-parse' +import wikiLinkPlugin from 'remark-wiki-link' +import remark2rehype from 'remark-rehype' export const Post = defineDocumentType(() => ({ name: 'Post', @@ -47,8 +52,39 @@ export const Note = defineDocumentType(() => ({ }, })) +export const Seed = defineDocumentType(() => ({ + name: 'Seed', + filePathPattern: 'garden/*.md', + fields: { + title: { type: 'string', required: true }, + wip: { type: 'boolean', required: false }, + createdAt: { type: 'string', required: true }, + updatedAt: { type: 'string', required: true }, + excerpt: { type: 'string', required: false }, + }, + computedFields: { + slug: { + type: 'string', + resolve: (seed) => seed._raw.flattenedPath.replace('garden/', ''), + }, + url: { + type: 'string', + resolve: (seed) => `/${seed._raw.flattenedPath}`, + }, + }, +})) + export default makeSource({ contentDirPath: 'content', - documentTypes: [Post, Note], - markdown: { rehypePlugins: [rehypePrism] }, + documentTypes: [Post, Note, Seed], + markdown: (builder) => { + builder.use(remarkFrontmatter) + builder.use(remarkParse as any) + builder.use(remark2rehype) + builder.use(rehypeStringify as any) + builder.use(rehypePrism) + builder.use(wikiLinkPlugin, { + hrefTemplate: (permalink: string) => `/digital-garden/${permalink}`, + }) + }, }) diff --git a/package-lock.json b/package-lock.json index 967daed..d4d4942 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,9 +30,11 @@ "rehype-prism-plus": "^1.5.0", "rehype-stringify": "^9.0.3", "remark": "^14.0.2", + "remark-frontmatter": "^4.0.1", "remark-html": "^15.0.1", "remark-parse": "^10.0.1", "remark-rehype": "^10.1.0", + "remark-wiki-link": "^1.0.4", "tinacms": "^1.2.1", "unified": "^10.1.2" }, @@ -1428,21 +1430,6 @@ "@esbuild/win32-x64": "0.17.19" } }, - "node_modules/@contentlayer/core/node_modules/remark-frontmatter": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/remark-frontmatter/-/remark-frontmatter-4.0.1.tgz", - "integrity": "sha512-38fJrB0KnmD3E33a5jZC/5+gGAC2WKNiPw1/fdXJvijBlhA7RCsvJklrYJakS0HedninvaCYW8lQGf9C918GfA==", - "dependencies": { - "@types/mdast": "^3.0.0", - "mdast-util-frontmatter": "^1.0.0", - "micromark-extension-frontmatter": "^1.0.0", - "unified": "^10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, "node_modules/@contentlayer/core/node_modules/type-fest": { "version": "3.12.0", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.12.0.tgz", @@ -5137,6 +5124,18 @@ "esbuild": "bin/esbuild" } }, + "node_modules/@tinacms/graphql/node_modules/fault": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/fault/-/fault-1.0.4.tgz", + "integrity": "sha512-CJ0HCB5tL5fYTEA7ToAq5+kTwd++Borf1/bifxd9iT70QcXr4MRrO3Llf8Ifs70q+SJcGHFtnIE/Nw6giCtECA==", + "dependencies": { + "format": "^0.2.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/@tinacms/graphql/node_modules/hast-util-is-element": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/hast-util-is-element/-/hast-util-is-element-1.1.0.tgz", @@ -5292,6 +5291,18 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/@tinacms/graphql/node_modules/mdast-util-frontmatter": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/mdast-util-frontmatter/-/mdast-util-frontmatter-0.2.0.tgz", + "integrity": "sha512-FHKL4w4S5fdt1KjJCwB0178WJ0evnyyQr5kXTM3wrOVpytD0hrkvd+AOOjU9Td8onOejCkmZ+HQRT3CZ3coHHQ==", + "dependencies": { + "micromark-extension-frontmatter": "^0.2.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/@tinacms/graphql/node_modules/mdast-util-to-hast": { "version": "10.2.0", "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-10.2.0.tgz", @@ -5353,6 +5364,18 @@ "parse-entities": "^2.0.0" } }, + "node_modules/@tinacms/graphql/node_modules/micromark-extension-frontmatter": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/micromark-extension-frontmatter/-/micromark-extension-frontmatter-0.2.2.tgz", + "integrity": "sha512-q6nPLFCMTLtfsctAuS0Xh4vaolxSFUWUWR6PZSrXXiRy+SANGllpcqdXFv2z07l0Xz/6Hl40hK0ffNCJPH2n1A==", + "dependencies": { + "fault": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/@tinacms/graphql/node_modules/parse-entities": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", @@ -5408,6 +5431,19 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/@tinacms/graphql/node_modules/remark-frontmatter": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remark-frontmatter/-/remark-frontmatter-3.0.0.tgz", + "integrity": "sha512-mSuDd3svCHs+2PyO29h7iijIZx4plX0fheacJcAoYAASfgzgVIcXGYSq9GFyYocFLftQs8IOmmkgtOovs6d4oA==", + "dependencies": { + "mdast-util-frontmatter": "^0.2.0", + "micromark-extension-frontmatter": "^0.2.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/@tinacms/graphql/node_modules/remark-rehype": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/remark-rehype/-/remark-rehype-8.1.0.tgz", @@ -14118,6 +14154,143 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/mdast-util-wiki-link": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/mdast-util-wiki-link/-/mdast-util-wiki-link-0.0.2.tgz", + "integrity": "sha512-lSsR10/dPuYIxzjGZIGA4oYzsnEnqcsD6DTXL0pqdbBzNB9teKVZB2aIzZcUsdg31v/NoHOstkVwzbN6VrQLtw==", + "dependencies": { + "@babel/runtime": "^7.12.1", + "mdast-util-to-markdown": "^0.6.5" + } + }, + "node_modules/mdast-util-wiki-link/node_modules/character-entities": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", + "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/mdast-util-wiki-link/node_modules/character-entities-legacy": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz", + "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/mdast-util-wiki-link/node_modules/character-reference-invalid": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", + "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/mdast-util-wiki-link/node_modules/is-alphabetical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", + "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/mdast-util-wiki-link/node_modules/is-alphanumerical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz", + "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==", + "dependencies": { + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/mdast-util-wiki-link/node_modules/is-decimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", + "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/mdast-util-wiki-link/node_modules/is-hexadecimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz", + "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/mdast-util-wiki-link/node_modules/longest-streak": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-2.0.4.tgz", + "integrity": "sha512-vM6rUVCVUJJt33bnmHiZEvr7wPT78ztX7rojL+LW51bHtLh6HTjx84LA5W4+oa6aKEJA7jJu5LR6vQRBpA5DVg==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/mdast-util-wiki-link/node_modules/mdast-util-to-markdown": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-0.6.5.tgz", + "integrity": "sha512-XeV9sDE7ZlOQvs45C9UKMtfTcctcaj/pGwH8YLbMHoMOXNNCn2LsqVQOqrF1+/NU8lKDAqozme9SCXWyo9oAcQ==", + "dependencies": { + "@types/unist": "^2.0.0", + "longest-streak": "^2.0.0", + "mdast-util-to-string": "^2.0.0", + "parse-entities": "^2.0.0", + "repeat-string": "^1.0.0", + "zwitch": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-wiki-link/node_modules/mdast-util-to-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz", + "integrity": "sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-wiki-link/node_modules/parse-entities": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", + "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==", + "dependencies": { + "character-entities": "^1.0.0", + "character-entities-legacy": "^1.0.0", + "character-reference-invalid": "^1.0.0", + "is-alphanumerical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-hexadecimal": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/mdast-util-wiki-link/node_modules/zwitch": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-1.0.5.tgz", + "integrity": "sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/mdurl": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", @@ -14146,21 +14319,6 @@ "esbuild": "0.*" } }, - "node_modules/mdx-bundler/node_modules/remark-frontmatter": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/remark-frontmatter/-/remark-frontmatter-4.0.1.tgz", - "integrity": "sha512-38fJrB0KnmD3E33a5jZC/5+gGAC2WKNiPw1/fdXJvijBlhA7RCsvJklrYJakS0HedninvaCYW8lQGf9C918GfA==", - "dependencies": { - "@types/mdast": "^3.0.0", - "mdast-util-frontmatter": "^1.0.0", - "micromark-extension-frontmatter": "^1.0.0", - "unified": "^10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -14584,6 +14742,14 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/micromark-extension-wiki-link": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/micromark-extension-wiki-link/-/micromark-extension-wiki-link-0.0.4.tgz", + "integrity": "sha512-dJc8AfnoU8BHkN+7fWZvIS20SMsMS1ZlxQUn6We67MqeKbOiEDZV5eEvCpwqGBijbJbxX3Kxz879L4K9HIiOvw==", + "dependencies": { + "@babel/runtime": "^7.12.1" + } + }, "node_modules/micromark-factory-destination": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-1.0.0.tgz", @@ -17365,48 +17531,14 @@ } }, "node_modules/remark-frontmatter": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/remark-frontmatter/-/remark-frontmatter-3.0.0.tgz", - "integrity": "sha512-mSuDd3svCHs+2PyO29h7iijIZx4plX0fheacJcAoYAASfgzgVIcXGYSq9GFyYocFLftQs8IOmmkgtOovs6d4oA==", - "dependencies": { - "mdast-util-frontmatter": "^0.2.0", - "micromark-extension-frontmatter": "^0.2.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/remark-frontmatter/node_modules/fault": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/fault/-/fault-1.0.4.tgz", - "integrity": "sha512-CJ0HCB5tL5fYTEA7ToAq5+kTwd++Borf1/bifxd9iT70QcXr4MRrO3Llf8Ifs70q+SJcGHFtnIE/Nw6giCtECA==", - "dependencies": { - "format": "^0.2.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/remark-frontmatter/node_modules/mdast-util-frontmatter": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/mdast-util-frontmatter/-/mdast-util-frontmatter-0.2.0.tgz", - "integrity": "sha512-FHKL4w4S5fdt1KjJCwB0178WJ0evnyyQr5kXTM3wrOVpytD0hrkvd+AOOjU9Td8onOejCkmZ+HQRT3CZ3coHHQ==", - "dependencies": { - "micromark-extension-frontmatter": "^0.2.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/remark-frontmatter/node_modules/micromark-extension-frontmatter": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/micromark-extension-frontmatter/-/micromark-extension-frontmatter-0.2.2.tgz", - "integrity": "sha512-q6nPLFCMTLtfsctAuS0Xh4vaolxSFUWUWR6PZSrXXiRy+SANGllpcqdXFv2z07l0Xz/6Hl40hK0ffNCJPH2n1A==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/remark-frontmatter/-/remark-frontmatter-4.0.1.tgz", + "integrity": "sha512-38fJrB0KnmD3E33a5jZC/5+gGAC2WKNiPw1/fdXJvijBlhA7RCsvJklrYJakS0HedninvaCYW8lQGf9C918GfA==", "dependencies": { - "fault": "^1.0.0" + "@types/mdast": "^3.0.0", + "mdast-util-frontmatter": "^1.0.0", + "micromark-extension-frontmatter": "^1.0.0", + "unified": "^10.0.0" }, "funding": { "type": "opencollective", @@ -17533,6 +17665,16 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/remark-wiki-link": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/remark-wiki-link/-/remark-wiki-link-1.0.4.tgz", + "integrity": "sha512-kLgRlXn5cBMa3Fa+OgcI6L4yyYdI74TdIiynBtOvrZN9q7o4mDCYrfAAt7VgLvQyuLBrPARPM1g67ZuAWA1yFg==", + "dependencies": { + "@babel/runtime": "^7.4.4", + "mdast-util-wiki-link": "^0.0.2", + "micromark-extension-wiki-link": "^0.0.4" + } + }, "node_modules/remove-trailing-separator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", @@ -21928,17 +22070,6 @@ "@esbuild/win32-x64": "0.17.19" } }, - "remark-frontmatter": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/remark-frontmatter/-/remark-frontmatter-4.0.1.tgz", - "integrity": "sha512-38fJrB0KnmD3E33a5jZC/5+gGAC2WKNiPw1/fdXJvijBlhA7RCsvJklrYJakS0HedninvaCYW8lQGf9C918GfA==", - "requires": { - "@types/mdast": "^3.0.0", - "mdast-util-frontmatter": "^1.0.0", - "micromark-extension-frontmatter": "^1.0.0", - "unified": "^10.0.0" - } - }, "type-fest": { "version": "3.12.0", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.12.0.tgz", @@ -24707,6 +24838,14 @@ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.12.29.tgz", "integrity": "sha512-w/XuoBCSwepyiZtIRsKsetiLDUVGPVw1E/R3VTFSecIy8UR7Cq3SOtwKHJMFoVqqVG36aGkzh4e8BvpO1Fdc7g==" }, + "fault": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/fault/-/fault-1.0.4.tgz", + "integrity": "sha512-CJ0HCB5tL5fYTEA7ToAq5+kTwd++Borf1/bifxd9iT70QcXr4MRrO3Llf8Ifs70q+SJcGHFtnIE/Nw6giCtECA==", + "requires": { + "format": "^0.2.0" + } + }, "hast-util-is-element": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/hast-util-is-element/-/hast-util-is-element-1.1.0.tgz", @@ -24810,6 +24949,14 @@ } } }, + "mdast-util-frontmatter": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/mdast-util-frontmatter/-/mdast-util-frontmatter-0.2.0.tgz", + "integrity": "sha512-FHKL4w4S5fdt1KjJCwB0178WJ0evnyyQr5kXTM3wrOVpytD0hrkvd+AOOjU9Td8onOejCkmZ+HQRT3CZ3coHHQ==", + "requires": { + "micromark-extension-frontmatter": "^0.2.0" + } + }, "mdast-util-to-hast": { "version": "10.2.0", "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-10.2.0.tgz", @@ -24851,6 +24998,14 @@ "parse-entities": "^2.0.0" } }, + "micromark-extension-frontmatter": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/micromark-extension-frontmatter/-/micromark-extension-frontmatter-0.2.2.tgz", + "integrity": "sha512-q6nPLFCMTLtfsctAuS0Xh4vaolxSFUWUWR6PZSrXXiRy+SANGllpcqdXFv2z07l0Xz/6Hl40hK0ffNCJPH2n1A==", + "requires": { + "fault": "^1.0.0" + } + }, "parse-entities": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", @@ -24946,6 +25101,15 @@ } } }, + "remark-frontmatter": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remark-frontmatter/-/remark-frontmatter-3.0.0.tgz", + "integrity": "sha512-mSuDd3svCHs+2PyO29h7iijIZx4plX0fheacJcAoYAASfgzgVIcXGYSq9GFyYocFLftQs8IOmmkgtOovs6d4oA==", + "requires": { + "mdast-util-frontmatter": "^0.2.0", + "micromark-extension-frontmatter": "^0.2.0" + } + }, "remark-rehype": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/remark-rehype/-/remark-rehype-8.1.0.tgz", @@ -31177,6 +31341,97 @@ "unist-util-visit": "^4.0.0" } }, + "mdast-util-wiki-link": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/mdast-util-wiki-link/-/mdast-util-wiki-link-0.0.2.tgz", + "integrity": "sha512-lSsR10/dPuYIxzjGZIGA4oYzsnEnqcsD6DTXL0pqdbBzNB9teKVZB2aIzZcUsdg31v/NoHOstkVwzbN6VrQLtw==", + "requires": { + "@babel/runtime": "^7.12.1", + "mdast-util-to-markdown": "^0.6.5" + }, + "dependencies": { + "character-entities": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", + "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==" + }, + "character-entities-legacy": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz", + "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==" + }, + "character-reference-invalid": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", + "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==" + }, + "is-alphabetical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", + "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==" + }, + "is-alphanumerical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz", + "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==", + "requires": { + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0" + } + }, + "is-decimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", + "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==" + }, + "is-hexadecimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz", + "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==" + }, + "longest-streak": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-2.0.4.tgz", + "integrity": "sha512-vM6rUVCVUJJt33bnmHiZEvr7wPT78ztX7rojL+LW51bHtLh6HTjx84LA5W4+oa6aKEJA7jJu5LR6vQRBpA5DVg==" + }, + "mdast-util-to-markdown": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-0.6.5.tgz", + "integrity": "sha512-XeV9sDE7ZlOQvs45C9UKMtfTcctcaj/pGwH8YLbMHoMOXNNCn2LsqVQOqrF1+/NU8lKDAqozme9SCXWyo9oAcQ==", + "requires": { + "@types/unist": "^2.0.0", + "longest-streak": "^2.0.0", + "mdast-util-to-string": "^2.0.0", + "parse-entities": "^2.0.0", + "repeat-string": "^1.0.0", + "zwitch": "^1.0.0" + } + }, + "mdast-util-to-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz", + "integrity": "sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==" + }, + "parse-entities": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", + "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==", + "requires": { + "character-entities": "^1.0.0", + "character-entities-legacy": "^1.0.0", + "character-reference-invalid": "^1.0.0", + "is-alphanumerical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-hexadecimal": "^1.0.0" + } + }, + "zwitch": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-1.0.5.tgz", + "integrity": "sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==" + } + } + }, "mdurl": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", @@ -31196,19 +31451,6 @@ "remark-mdx-frontmatter": "^1.1.1", "uuid": "^8.3.2", "vfile": "^5.3.2" - }, - "dependencies": { - "remark-frontmatter": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/remark-frontmatter/-/remark-frontmatter-4.0.1.tgz", - "integrity": "sha512-38fJrB0KnmD3E33a5jZC/5+gGAC2WKNiPw1/fdXJvijBlhA7RCsvJklrYJakS0HedninvaCYW8lQGf9C918GfA==", - "requires": { - "@types/mdast": "^3.0.0", - "mdast-util-frontmatter": "^1.0.0", - "micromark-extension-frontmatter": "^1.0.0", - "unified": "^10.0.0" - } - } } }, "media-typer": { @@ -31523,6 +31765,14 @@ "vfile-message": "^3.0.0" } }, + "micromark-extension-wiki-link": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/micromark-extension-wiki-link/-/micromark-extension-wiki-link-0.0.4.tgz", + "integrity": "sha512-dJc8AfnoU8BHkN+7fWZvIS20SMsMS1ZlxQUn6We67MqeKbOiEDZV5eEvCpwqGBijbJbxX3Kxz879L4K9HIiOvw==", + "requires": { + "@babel/runtime": "^7.12.1" + } + }, "micromark-factory-destination": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-1.0.0.tgz", @@ -33396,38 +33646,14 @@ } }, "remark-frontmatter": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/remark-frontmatter/-/remark-frontmatter-3.0.0.tgz", - "integrity": "sha512-mSuDd3svCHs+2PyO29h7iijIZx4plX0fheacJcAoYAASfgzgVIcXGYSq9GFyYocFLftQs8IOmmkgtOovs6d4oA==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/remark-frontmatter/-/remark-frontmatter-4.0.1.tgz", + "integrity": "sha512-38fJrB0KnmD3E33a5jZC/5+gGAC2WKNiPw1/fdXJvijBlhA7RCsvJklrYJakS0HedninvaCYW8lQGf9C918GfA==", "requires": { - "mdast-util-frontmatter": "^0.2.0", - "micromark-extension-frontmatter": "^0.2.0" - }, - "dependencies": { - "fault": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/fault/-/fault-1.0.4.tgz", - "integrity": "sha512-CJ0HCB5tL5fYTEA7ToAq5+kTwd++Borf1/bifxd9iT70QcXr4MRrO3Llf8Ifs70q+SJcGHFtnIE/Nw6giCtECA==", - "requires": { - "format": "^0.2.0" - } - }, - "mdast-util-frontmatter": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/mdast-util-frontmatter/-/mdast-util-frontmatter-0.2.0.tgz", - "integrity": "sha512-FHKL4w4S5fdt1KjJCwB0178WJ0evnyyQr5kXTM3wrOVpytD0hrkvd+AOOjU9Td8onOejCkmZ+HQRT3CZ3coHHQ==", - "requires": { - "micromark-extension-frontmatter": "^0.2.0" - } - }, - "micromark-extension-frontmatter": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/micromark-extension-frontmatter/-/micromark-extension-frontmatter-0.2.2.tgz", - "integrity": "sha512-q6nPLFCMTLtfsctAuS0Xh4vaolxSFUWUWR6PZSrXXiRy+SANGllpcqdXFv2z07l0Xz/6Hl40hK0ffNCJPH2n1A==", - "requires": { - "fault": "^1.0.0" - } - } + "@types/mdast": "^3.0.0", + "mdast-util-frontmatter": "^1.0.0", + "micromark-extension-frontmatter": "^1.0.0", + "unified": "^10.0.0" } }, "remark-html": { @@ -33523,6 +33749,16 @@ "unified": "^10.0.0" } }, + "remark-wiki-link": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/remark-wiki-link/-/remark-wiki-link-1.0.4.tgz", + "integrity": "sha512-kLgRlXn5cBMa3Fa+OgcI6L4yyYdI74TdIiynBtOvrZN9q7o4mDCYrfAAt7VgLvQyuLBrPARPM1g67ZuAWA1yFg==", + "requires": { + "@babel/runtime": "^7.4.4", + "mdast-util-wiki-link": "^0.0.2", + "micromark-extension-wiki-link": "^0.0.4" + } + }, "remove-trailing-separator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", diff --git a/package.json b/package.json index 5780514..7428401 100644 --- a/package.json +++ b/package.json @@ -31,9 +31,11 @@ "rehype-prism-plus": "^1.5.0", "rehype-stringify": "^9.0.3", "remark": "^14.0.2", + "remark-frontmatter": "^4.0.1", "remark-html": "^15.0.1", "remark-parse": "^10.0.1", "remark-rehype": "^10.1.0", + "remark-wiki-link": "^1.0.4", "tinacms": "^1.2.1", "unified": "^10.1.2" }, diff --git a/tailwind.config.js b/tailwind.config.js index d83bcef..e53d88a 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -11,7 +11,7 @@ module.exports = { }, fontFamily: { body: ['var(--font-main)'], - headline: ['var(--font-main)'], + headline: ['var(--font-title)'], }, extend: {}, }, diff --git a/types/remark-wiki-link.d.ts b/types/remark-wiki-link.d.ts new file mode 100644 index 0000000..a59622f --- /dev/null +++ b/types/remark-wiki-link.d.ts @@ -0,0 +1 @@ +declare module 'remark-wiki-link'