diff --git a/README.md b/README.md deleted file mode 100644 index 957ce27be..000000000 --- a/README.md +++ /dev/null @@ -1,61 +0,0 @@ -# πŸ₯Fuwari - -A static blog template built with [Astro](https://astro.build). - -[**πŸ–₯️ Live Demo (Vercel)**](https://fuwari.vercel.app)   /    -[**πŸ“¦ Old Hexo Version**](https://github.com/saicaca/hexo-theme-vivia)   /    -[**🌏 δΈ­ζ–‡**](https://github.com/saicaca/fuwari/blob/main/README.zh-CN.md)   /    -[**🌏 ζ—₯本θͺž**](https://github.com/saicaca/fuwari/blob/main/README.ja-JP.md)   /    -[**🌏 ν•œκ΅­μ–΄**](https://github.com/saicaca/fuwari/blob/main/README.ko.md) - -> README version: `2024-04-07` - -![Preview Image](https://raw.githubusercontent.com/saicaca/resource/main/fuwari/home.png) - -## ✨ Features - -- [x] Built with [Astro](https://astro.build) and [Tailwind CSS](https://tailwindcss.com) -- [x] Smooth animations and page transitions -- [x] Light / dark mode -- [x] Customizable theme colors & banner -- [x] Responsive design -- [ ] Comments -- [x] Search -- [ ] TOC - -## πŸš€ How to Use - -1. [Generate a new repository](https://github.com/saicaca/fuwari/generate) from this template or fork this repository. -2. To edit your blog locally, clone your repository, run `pnpm install` AND `pnpm add sharp` to install dependencies. - - Install [pnpm](https://pnpm.io) `npm install -g pnpm` if you haven't. -3. Edit the config file `src/config.ts` to customize your blog. -4. Run `pnpm new-post ` to create a new post and edit it in `src/content/posts/`. -5. Deploy your blog to Vercel, Netlify, GitHub Pages, etc. following [the guides](https://docs.astro.build/en/guides/deploy/). You need to edit the site configuration in `astro.config.mjs` before deployment. - -## βš™οΈ Frontmatter of Posts - -```yaml ---- -title: My First Blog Post -published: 2023-09-09 -description: This is the first post of my new Astro blog. -image: /images/cover.jpg -tags: [Foo, Bar] -category: Front-end -draft: false ---- -``` - -## 🧞 Commands - -All commands are run from the root of the project, from a terminal: - -| Command | Action | -|:------------------------------------|:-------------------------------------------------| -| `pnpm install` AND `pnpm add sharp` | Installs dependencies | -| `pnpm dev` | Starts local dev server at `localhost:4321` | -| `pnpm build` | Build your production site to `./dist/` | -| `pnpm preview` | Preview your build locally, before deploying | -| `pnpm new-post ` | Create a new post | -| `pnpm astro ...` | Run CLI commands like `astro add`, `astro check` | -| `pnpm astro --help` | Get help using the Astro CLI | diff --git a/src/components/ArchivePanel.astro b/src/components/ArchivePanel.astro index a3596c328..8c5fa8c33 100644 --- a/src/components/ArchivePanel.astro +++ b/src/components/ArchivePanel.astro @@ -74,12 +74,15 @@ function formatTag(tag: string[]) {
-
{group.posts.length} {i18n(I18nKey.postsCount)}
+
+ {group.posts.length} {group.posts.length === 1 ? i18n(I18nKey.postCount) : i18n(I18nKey.postsCount)} +
{group.posts.map(post => ( -
@@ -130,4 +133,4 @@ function formatTag(tag: string[]) { border-dashed pointer-events-none border-[var(--line-color)] transition } } - \ No newline at end of file + diff --git a/src/components/PostCard.astro b/src/components/PostCard.astro index 6ccf9b1cc..e6da8781d 100644 --- a/src/components/PostCard.astro +++ b/src/components/PostCard.astro @@ -61,12 +61,18 @@ const { remarkPluginFrontmatter } = await entry.render() { description || remarkPluginFrontmatter.excerpt }
- -
-
{remarkPluginFrontmatter.words} {" " + i18n(I18nKey.wordsCount)}
-
|
-
{remarkPluginFrontmatter.minutes} {" " + i18n(I18nKey.minutesCount)}
-
+ +
+
+ {remarkPluginFrontmatter.words} {" "} + {remarkPluginFrontmatter.words === 1 ? i18n(I18nKey.wordCount) : i18n(I18nKey.wordsCount)} +
+
|
+
+ {remarkPluginFrontmatter.minutes} {" "} + {remarkPluginFrontmatter.minutes === 1 ? i18n(I18nKey.minuteCount) : i18n(I18nKey.minutesCount)} +
+
diff --git a/src/pages/posts/[...slug].astro b/src/pages/posts/[...slug].astro index 5025db603..c010bc6d6 100644 --- a/src/pages/posts/[...slug].astro +++ b/src/pages/posts/[...slug].astro @@ -51,21 +51,27 @@ const jsonLd = {
- -
-
-
- -
-
{remarkPluginFrontmatter.words} {" " + i18n(I18nKey.wordsCount)}
-
-
-
- -
-
{remarkPluginFrontmatter.minutes} {" " + i18n(I18nKey.minutesCount)}
-
-
+ +
+
+
+ +
+
+ {remarkPluginFrontmatter.words} {" "} + {remarkPluginFrontmatter.words === 1 ? i18n(I18nKey.wordCount) : i18n(I18nKey.wordsCount)} +
+
+
+
+ +
+
+ {remarkPluginFrontmatter.minutes} {" "} + {remarkPluginFrontmatter.minutes === 1 ? i18n(I18nKey.minuteCount) : i18n(I18nKey.minutesCount)} +
+
+