fuwari icon indicating copy to clipboard operation
fuwari copied to clipboard

feat: add language as post property

Open at-wr opened this issue 1 year ago • 3 comments

Related issue: #150

Users can specify the language type for individual posts by adding language: en (or zh-CN, en-US, etc. ) to the Markdown frontmatter. This allows for the customization of the lang attribute in the <html> tag, enhancing accessibility and improving search engine optimization.

Example of the Markdown frontmatter:

---
title: Hello World
description: Here goes the description
published: 2024-08-12
draft: false
category: Casual
tags: []
language: en-US
---

at-wr avatar Aug 12 '24 01:08 at-wr

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fuwari-yags ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 27, 2024 3:49pm

vercel[bot] avatar Aug 12 '24 01:08 vercel[bot]

I believe adding Language lable at PostMeta.astro is unnecessary, but not pretty sure wheather I should add the language field in the frontmatter template of new-post.js.

at-wr avatar Aug 12 '24 07:08 at-wr

I believe adding Language lable at PostMeta.astro is unnecessary, but not pretty sure wheather I should add the language field in the frontmatter template of new-post.js.

I think it's OK to add it to new-post.js.

Also could you please format the code with pnpm format?

saicaca avatar Aug 15 '24 16:08 saicaca

I believe adding Language lable at PostMeta.astro is unnecessary, but not pretty sure wheather I should add the language field in the frontmatter template of new-post.js.

I think it's OK to add it to new-post.js.

Also could you please format the code with pnpm format?

Formatted in the latest commit 😉

at-wr avatar Aug 16 '24 05:08 at-wr

Thank you for your contribution!

saicaca avatar Aug 27 '24 15:08 saicaca