From ab89683cd74d0f7e9c5e25a0aadc59e6896ddb27 Mon Sep 17 00:00:00 2001 From: saicaca Date: Fri, 3 Nov 2023 16:22:33 +0800 Subject: [PATCH] fix: markdown style for the About page --- src/components/misc/Markdown.astro | 100 +++++++++++++++++++++++++++++ src/content/posts/markdown.md | 2 +- src/content/spec/about.md | 9 ++- src/pages/about.astro | 5 +- src/pages/posts/[slug].astro | 100 ++--------------------------- 5 files changed, 115 insertions(+), 101 deletions(-) create mode 100644 src/components/misc/Markdown.astro diff --git a/src/components/misc/Markdown.astro b/src/components/misc/Markdown.astro new file mode 100644 index 0000000..6fb94da --- /dev/null +++ b/src/components/misc/Markdown.astro @@ -0,0 +1,100 @@ +--- +interface Props { + class: string; +} +const className = Astro.props.class; +--- +
+ + + +
+ + \ No newline at end of file diff --git a/src/content/posts/markdown.md b/src/content/posts/markdown.md index 691a77b..30f2d90 100644 --- a/src/content/posts/markdown.md +++ b/src/content/posts/markdown.md @@ -155,7 +155,7 @@ Here's a "line block": and images can be specified like so: -![example image](/images/demo-banner.jpg "An exemplary image") +![example image](../../assets/images/demo-banner.png "An exemplary image") Inline math equations go in like so: $\omega = d\phi / dt$. Display math should get its own line and be put in in double-dollarsigns: diff --git a/src/content/spec/about.md b/src/content/spec/about.md index 5b0691e..ecbb28e 100644 --- a/src/content/spec/about.md +++ b/src/content/spec/about.md @@ -1,2 +1,7 @@ -## About -This is the about page. +# About +This is the demo site for [Fuwari](https://github.com/saicaca/fuwari). + +> ### Sources of images used in this site +> - [Unsplash](https://unsplash.com/) +> - [星と少女](https://www.pixiv.net/artworks/108916539) by [Stella](https://www.pixiv.net/users/93273965) +> - [Rabbit - v1.4 Showcase](https://civitai.com/posts/586908) by [Rabbit_YourMajesty](https://civitai.com/user/Rabbit_YourMajesty) \ No newline at end of file diff --git a/src/pages/about.astro b/src/pages/about.astro index 7f79402..429ddb1 100644 --- a/src/pages/about.astro +++ b/src/pages/about.astro @@ -5,6 +5,7 @@ import MainGridLayout from "../layouts/MainGridLayout.astro"; import { getEntry } from 'astro:content' import {i18n} from "../i18n/translation"; import I18nKey from "../i18n/i18nKey"; +import Markdown from "../components/misc/Markdown.astro"; const aboutPost = await getEntry('spec', 'about') @@ -14,9 +15,9 @@ const { Content } = await aboutPost.render()
-
+ -
+
\ No newline at end of file diff --git a/src/pages/posts/[slug].astro b/src/pages/posts/[slug].astro index 7a1921e..3df8e84 100644 --- a/src/pages/posts/[slug].astro +++ b/src/pages/posts/[slug].astro @@ -10,6 +10,7 @@ import I18nKey from "../../i18n/i18nKey"; import {getPostUrlBySlug} from "../../utils/url-utils"; import License from "../../components/misc/License.astro"; import {licenseConfig} from "../../config"; +import Markdown from "../../components/misc/Markdown.astro"; export async function getStaticPaths() { const blogEntries = await getCollection('posts'); @@ -74,12 +75,9 @@ const { remarkPluginFrontmatter } = await entry.render(); {!entry.data.image &&
} -
- - + -
+ {licenseConfig.enable && } @@ -106,94 +104,4 @@ const { remarkPluginFrontmatter } = await entry.render(); - - - \ No newline at end of file + \ No newline at end of file