feat: add language as post property
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
---
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 |
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 believe adding Language lable at
PostMeta.astrois unnecessary, but not pretty sure wheather I should add thelanguagefield in the frontmatter template ofnew-post.js.
I think it's OK to add it to new-post.js.
Also could you please format the code with pnpm format?
I believe adding Language lable at
PostMeta.astrois unnecessary, but not pretty sure wheather I should add thelanguagefield in the frontmatter template ofnew-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 😉
Thank you for your contribution!