diff --git a/blog/2024/taylor-series/post.toml b/blog/2024/taylor-series/post.toml index 9b38936..2e17c2f 100644 --- a/blog/2024/taylor-series/post.toml +++ b/blog/2024/taylor-series/post.toml @@ -1,3 +1,5 @@ +#:schema ../../../post.schema.json + title = "A Brief Introduction to Taylor Series" [manifest] diff --git a/blog/2024/test-post/post.toml b/blog/2024/test-post/post.toml index dfee56a..c66b4a1 100644 --- a/blog/2024/test-post/post.toml +++ b/blog/2024/test-post/post.toml @@ -1,3 +1,4 @@ +#:schema ../../../post.schema.json title = "My Awesome Blog Post" [manifest] @@ -12,6 +13,6 @@ primary = ["Rust", "WebAssembly"] secondary = ["Web Development", "Frontend"] [cover] -src = "cover.jpg" +src = "https://machinelearningmastery.com/wp-content/uploads/2021/07/tayloreq6.png" alt = "A Rust and WebAssembly logo" caption = "Rust and WebAssembly" diff --git a/package.json b/package.json index 00df919..d21e531 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ "@types/node": "^20.12.5", "bits-ui": "^0.21.2", "clsx": "^2.1.0", + "coredump": "link:", "dayjs": "^1.11.10", "mode-watcher": "^0.3.0", "rehype-katex": "^7.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0787c8f..91a5e72 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -32,6 +32,9 @@ dependencies: clsx: specifier: ^2.1.0 version: 2.1.0 + coredump: + specifier: 'link:' + version: 'link:' dayjs: specifier: ^1.11.10 version: 1.11.10 diff --git a/post.schema.json b/post.schema.json new file mode 100644 index 0000000..3e9ae47 --- /dev/null +++ b/post.schema.json @@ -0,0 +1,69 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "manifest": { + "type": "object", + "properties": { + "date": { + "type": "string", + "format": "date-time" + }, + "blurb": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string" + }, + "authors": { + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "type": "object", + "properties": { + "primary": { + "type": "array", + "items": { + "type": "string" + } + }, + "secondary": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": ["primary", "secondary"] + } + }, + "required": ["date", "blurb", "description", "type", "authors", "tags"] + }, + "cover": { + "type": "object", + "properties": { + "src": { + "type": "string", + "format": "uri" + }, + "alt": { + "type": "string" + }, + "caption": { + "type": "string" + } + }, + "required": ["src", "alt", "caption"] + } + }, + "required": ["title", "manifest", "cover"] +} diff --git a/src/lib/components/Blog/Crumbs.svelte b/src/lib/components/Blog/Crumbs.svelte index 1e0b103..4e09169 100644 --- a/src/lib/components/Blog/Crumbs.svelte +++ b/src/lib/components/Blog/Crumbs.svelte @@ -1,5 +1,5 @@ -
- The Coredump - - {#each trail as crumb, i} -
{crumb}
- - {/each} -
{title}
-
+ + + The Coredump + + {#each trail as crumb, i} + {crumb} + + {/each} + + + {title} + + + + diff --git a/src/lib/components/Blog/PostCard.svelte b/src/lib/components/Blog/PostCard.svelte index 68087b9..e83cab1 100644 --- a/src/lib/components/Blog/PostCard.svelte +++ b/src/lib/components/Blog/PostCard.svelte @@ -1,6 +1,5 @@ + + diff --git a/src/lib/components/ui/breadcrumb/breadcrumb-item.svelte b/src/lib/components/ui/breadcrumb/breadcrumb-item.svelte new file mode 100644 index 0000000..8e8b187 --- /dev/null +++ b/src/lib/components/ui/breadcrumb/breadcrumb-item.svelte @@ -0,0 +1,16 @@ + + +
  • + +
  • diff --git a/src/lib/components/ui/breadcrumb/breadcrumb-link.svelte b/src/lib/components/ui/breadcrumb/breadcrumb-link.svelte new file mode 100644 index 0000000..e743768 --- /dev/null +++ b/src/lib/components/ui/breadcrumb/breadcrumb-link.svelte @@ -0,0 +1,31 @@ + + +{#if asChild} + +{:else} + + + +{/if} diff --git a/src/lib/components/ui/breadcrumb/breadcrumb-list.svelte b/src/lib/components/ui/breadcrumb/breadcrumb-list.svelte new file mode 100644 index 0000000..7f36141 --- /dev/null +++ b/src/lib/components/ui/breadcrumb/breadcrumb-list.svelte @@ -0,0 +1,23 @@ + + +
      + +
    diff --git a/src/lib/components/ui/breadcrumb/breadcrumb-page.svelte b/src/lib/components/ui/breadcrumb/breadcrumb-page.svelte new file mode 100644 index 0000000..757f60e --- /dev/null +++ b/src/lib/components/ui/breadcrumb/breadcrumb-page.svelte @@ -0,0 +1,23 @@ + + + + + diff --git a/src/lib/components/ui/breadcrumb/breadcrumb-separator.svelte b/src/lib/components/ui/breadcrumb/breadcrumb-separator.svelte new file mode 100644 index 0000000..681ef99 --- /dev/null +++ b/src/lib/components/ui/breadcrumb/breadcrumb-separator.svelte @@ -0,0 +1,25 @@ + + + diff --git a/src/lib/components/ui/breadcrumb/breadcrumb.svelte b/src/lib/components/ui/breadcrumb/breadcrumb.svelte new file mode 100644 index 0000000..104f8b0 --- /dev/null +++ b/src/lib/components/ui/breadcrumb/breadcrumb.svelte @@ -0,0 +1,15 @@ + + + diff --git a/src/lib/components/ui/breadcrumb/index.ts b/src/lib/components/ui/breadcrumb/index.ts new file mode 100644 index 0000000..dc914ec --- /dev/null +++ b/src/lib/components/ui/breadcrumb/index.ts @@ -0,0 +1,25 @@ +import Root from "./breadcrumb.svelte"; +import Ellipsis from "./breadcrumb-ellipsis.svelte"; +import Item from "./breadcrumb-item.svelte"; +import Separator from "./breadcrumb-separator.svelte"; +import Link from "./breadcrumb-link.svelte"; +import List from "./breadcrumb-list.svelte"; +import Page from "./breadcrumb-page.svelte"; + +export { + Root, + Ellipsis, + Item, + Separator, + Link, + List, + Page, + // + Root as Breadcrumb, + Ellipsis as BreadcrumbEllipsis, + Item as BreadcrumbItem, + Separator as BreadcrumbSeparator, + Link as BreadcrumbLink, + List as BreadcrumbList, + Page as BreadcrumbPage, +};