mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-17 12:01:33 +02:00
chore: update theme intro and i18n meta tag
This commit is contained in:
parent
26a3cce66e
commit
e23f8bee96
5 changed files with 27 additions and 15 deletions
1
.gitattributes
vendored
1
.gitattributes
vendored
|
@ -1 +0,0 @@
|
||||||
*.mdx linguist-detectable=false
|
|
10
README.md
10
README.md
|
@ -21,8 +21,14 @@
|
||||||
|
|
||||||
Retypeset is a static blog theme based on the [Astro](https://astro.build/) framework, inspired by [Typography](https://astro-theme-typography.vercel.app/). Retypeset establishes a new visual standard and reimagines the layout of all pages, offering a reading experience similar to paper books, reviving the beauty of typography. Details in every sight, elegance in every space.
|
Retypeset is a static blog theme based on the [Astro](https://astro.build/) framework, inspired by [Typography](https://astro-theme-typography.vercel.app/). Retypeset establishes a new visual standard and reimagines the layout of all pages, offering a reading experience similar to paper books, reviving the beauty of typography. Details in every sight, elegance in every space.
|
||||||
|
|
||||||
- [Live Demo](https://retypeset.radishzz.cc/)
|
## Demo
|
||||||
- [Mobile design](https://mastergo.com/file/151079538766773?fileOpenFrom=home&page_id=M&source=link_share&shareId=151079538766773)
|
|
||||||
|
- [Retypeset](https://retypeset.radishzz.cc/en/)
|
||||||
|
- [Retipografía](https://retypeset.radishzz.cc/en/)
|
||||||
|
- [Переверстка](https://retypeset.radishzz.cc/en/)
|
||||||
|
- [重新编排](https://retypeset.radishzz.cc/en/)
|
||||||
|
- [重新編排](https://retypeset.radishzz.cc/en/)
|
||||||
|
- [再組版](https://retypeset.radishzz.cc/en/)
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
|
|
10
README.zh.md
10
README.zh.md
|
@ -21,8 +21,14 @@
|
||||||
|
|
||||||
Retypeset 是一款基于 [Astro](https://astro.build/) 框架的静态博客主题,设计灵感来自 [Typography](https://astro-theme-typography.vercel.app/)。本主题通过建立全新的视觉规范,对所有页面进行重新编排,打造纸质书页般的阅读体验,再现版式之美。所见皆为细节,方寸尽显优雅。
|
Retypeset 是一款基于 [Astro](https://astro.build/) 框架的静态博客主题,设计灵感来自 [Typography](https://astro-theme-typography.vercel.app/)。本主题通过建立全新的视觉规范,对所有页面进行重新编排,打造纸质书页般的阅读体验,再现版式之美。所见皆为细节,方寸尽显优雅。
|
||||||
|
|
||||||
- [在线预览](https://retypeset.radishzz.cc/)
|
## 预览
|
||||||
- [移动端设计稿](https://mastergo.com/file/151079538766773?fileOpenFrom=home&page_id=M&source=link_share&shareId=151079538766773)
|
|
||||||
|
- [重新编排](https://retypeset.radishzz.cc/en/)
|
||||||
|
- [重新編排](https://retypeset.radishzz.cc/en/)
|
||||||
|
- [再組版](https://retypeset.radishzz.cc/en/)
|
||||||
|
- [Retypeset](https://retypeset.radishzz.cc/en/)
|
||||||
|
- [Retipografía](https://retypeset.radishzz.cc/en/)
|
||||||
|
- [Переверстка](https://retypeset.radishzz.cc/en/)
|
||||||
|
|
||||||
## 特征
|
## 特征
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ export const themeConfig: ThemeConfig = {
|
||||||
// site title
|
// site title
|
||||||
title: 'Retypeset',
|
title: 'Retypeset',
|
||||||
// site subtitle
|
// site subtitle
|
||||||
subtitle: '再现版式之美',
|
subtitle: 'Revive the beauty of typography',
|
||||||
// use i18n title/subtitle from src/i18n/ui.ts instead of static ones above
|
// use i18n title/subtitle from src/i18n/ui.ts instead of static ones above
|
||||||
i18nTitle: true,
|
i18nTitle: true,
|
||||||
// site description
|
// site description
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
---
|
---
|
||||||
import { allLocales, defaultLocale, themeConfig } from '@/config'
|
import { allLocales, defaultLocale, themeConfig } from '@/config'
|
||||||
|
import { ui } from '@/i18n/ui'
|
||||||
|
import { getPageInfo } from '@/utils/page'
|
||||||
import { ClientRouter } from 'astro:transitions'
|
import { ClientRouter } from 'astro:transitions'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
@ -9,16 +11,19 @@ interface Props {
|
||||||
}
|
}
|
||||||
|
|
||||||
const { postTitle, postDescription, postSlug } = Astro.props
|
const { postTitle, postDescription, postSlug } = Astro.props
|
||||||
|
const { currentLang } = getPageInfo(Astro.url.pathname)
|
||||||
|
const currentUI = ui[currentLang as keyof typeof ui]
|
||||||
|
|
||||||
const { title, subtitle, description, author, url, favicon } = themeConfig.site
|
const { title, subtitle, description, author, url, favicon, i18nTitle } = themeConfig.site
|
||||||
const { mode, light: { background: lightMode }, dark: { background: darkMode } } = themeConfig.color
|
const { mode, light: { background: lightMode }, dark: { background: darkMode } } = themeConfig.color
|
||||||
// const { locale, moreLocales } = themeConfig.global
|
|
||||||
const { verification = {}, twitterID = '', googleAnalyticsID = '', umamiAnalyticsID = '' } = themeConfig.seo ?? {}
|
const { verification = {}, twitterID = '', googleAnalyticsID = '', umamiAnalyticsID = '' } = themeConfig.seo ?? {}
|
||||||
const { google = '', bing = '', yandex = '', baidu = '' } = verification
|
const { google = '', bing = '', yandex = '', baidu = '' } = verification
|
||||||
const { commentURL = '', imageHostURL = '', customGoogleAnalyticsJS = '', customUmamiAnalyticsJS = '' } = themeConfig.preload
|
const { commentURL = '', imageHostURL = '', customGoogleAnalyticsJS = '', customUmamiAnalyticsJS = '' } = themeConfig.preload
|
||||||
|
|
||||||
const initMetaTheme = mode === 'dark' ? darkMode : lightMode
|
const initMetaTheme = mode === 'dark' ? darkMode : lightMode
|
||||||
const pageTitle = postTitle ? `${postTitle} | ${title}` : `${title} - ${subtitle}`
|
const headTitle = i18nTitle ? currentUI.title : title
|
||||||
|
const headSubtitle = i18nTitle ? currentUI.subtitle : subtitle
|
||||||
|
const pageTitle = postTitle ? `${postTitle} | ${headTitle}` : `${headTitle} - ${headSubtitle}`
|
||||||
const pageDescription = postDescription || description
|
const pageDescription = postDescription || description
|
||||||
// TODO: Change openGraph image fallback url
|
// TODO: Change openGraph image fallback url
|
||||||
const pageImage = postSlug ? `${url}/opengraph/${postSlug}.png` : 'https://placehold.co/1200x630'
|
const pageImage = postSlug ? `${url}/opengraph/${postSlug}.png` : 'https://placehold.co/1200x630'
|
||||||
|
@ -69,12 +74,8 @@ const pageImage = postSlug ? `${url}/opengraph/${postSlug}.png` : 'https://place
|
||||||
<meta name="twitter:title" content={pageTitle} />
|
<meta name="twitter:title" content={pageTitle} />
|
||||||
<meta name="twitter:description" content={pageDescription} />
|
<meta name="twitter:description" content={pageDescription} />
|
||||||
<meta name="twitter:image" content={pageImage} />
|
<meta name="twitter:image" content={pageImage} />
|
||||||
{twitterID && (
|
{twitterID && <meta name="twitter:site" content={twitterID} />}
|
||||||
<>
|
{twitterID && <meta name="twitter:creator" content={twitterID} />}
|
||||||
<meta name="twitter:site" content={twitterID} />
|
|
||||||
<meta name="twitter:creator" content={twitterID} />
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<!-- Site Verification -->
|
<!-- Site Verification -->
|
||||||
{google && <meta name="google-site-verification" content={google} />}
|
{google && <meta name="google-site-verification" content={google} />}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue