From d3d9145610e0b33a4651c9f8af320e919b3c9283 Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Tue, 10 Sep 2024 05:28:25 -0500 Subject: [PATCH] some fixes --- .gitignore | 2 + .vscode/extensions.json | 5 +- frontmatter.json | 47 +++++++++++++++++++ src/components/PostList.astro | 7 ++- ...-docker-compose-container-without-shell.md | 2 +- ...3-path-induction-gadt-perspective.lagda.md | 2 +- .../index.md | 7 +++ src/pages/drafts.astro | 2 +- src/styles/post.scss | 3 ++ src/styles/tagList.scss | 4 +- 10 files changed, 73 insertions(+), 8 deletions(-) create mode 100644 frontmatter.json create mode 100644 src/content/posts/2024-09-10-lambda-calculus-part-1/index.md diff --git a/.gitignore b/.gitignore index 1cb103a..6124c61 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,5 @@ _build .pnpm-store /public/generated + +.frontmatter diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 22a1505..d821303 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,4 +1,7 @@ { - "recommendations": ["astro-build.astro-vscode"], + "recommendations": [ + "astro-build.astro-vscode", + "eliostruyf.vscode-front-matter" + ], "unwantedRecommendations": [] } diff --git a/frontmatter.json b/frontmatter.json new file mode 100644 index 0000000..5244cb4 --- /dev/null +++ b/frontmatter.json @@ -0,0 +1,47 @@ +{ + "$schema": "https://frontmatter.codes/frontmatter.schema.json", + "frontMatter.framework.id": "astro", + "frontMatter.preview.host": "http://localhost:4321", + "frontMatter.content.publicFolder": "public", + "frontMatter.content.pageFolders": [ + { + "title": "posts", + "path": "[[workspace]]/src/content/posts" + } + ], + "frontMatter.taxonomy.contentTypes": [ + { + "name": "default", + "pageBundle": false, + "previewPath": "", + "filePrefix": null, + "clearEmpty": true, + "fields": [ + { + "title": "Title", + "name": "title", + "type": "string", + "single": true + }, + { + "title": "Description", + "name": "description", + "type": "string" + }, + { + "title": "Publishing date", + "name": "date", + "type": "datetime", + "default": "{{now}}", + "isPublishDate": true + }, + { + "title": "Content preview", + "name": "heroImage", + "type": "image", + "isPreviewImage": true + } + ] + } + ] +} diff --git a/src/components/PostList.astro b/src/components/PostList.astro index d642589..a8f1054 100644 --- a/src/components/PostList.astro +++ b/src/components/PostList.astro @@ -79,7 +79,7 @@ const sortedPosts = sortBy(allPosts, (post) => -post.data.date);