mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-16 03:32:51 +02:00
feat: support i18n description meta tag
This commit is contained in:
parent
67cc90f744
commit
137d79f273
13 changed files with 29 additions and 43 deletions
|
@ -6,11 +6,11 @@ export const themeConfig: ThemeConfig = {
|
|||
// site title
|
||||
title: 'Retypeset',
|
||||
// site subtitle
|
||||
subtitle: '再现版式之美',
|
||||
// use i18n title/subtitle from src/i18n/ui.ts instead of static ones above
|
||||
i18nTitle: true,
|
||||
subtitle: 'Revive the beauty of typography',
|
||||
// site description
|
||||
description: 'Retypeset 是一款基于Astro框架的静态博客主题,设计灵感来自Typography。本主题通过建立全新的视觉规范,对所有页面进行重新编排,打造纸质书页般的阅读体验,再现版式之美。所见皆为细节,方寸尽显优雅。',
|
||||
description: 'Retypeset is a static blog theme based on the Astro framework, inspired by Typography. 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.',
|
||||
// use i18n title/subtitle/description from src/i18n/ui.ts instead of static ones above
|
||||
i18nTitle: true,
|
||||
// author name
|
||||
author: 'radishzz',
|
||||
// site url
|
||||
|
@ -93,7 +93,7 @@ export const themeConfig: ThemeConfig = {
|
|||
// SEO SETTINGS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> START
|
||||
seo: {
|
||||
// @twitter ID
|
||||
twitterID: '@astrodotbuild',
|
||||
twitterID: '@radishzz_',
|
||||
// site verification
|
||||
verification: {
|
||||
// google search console
|
||||
|
@ -101,7 +101,7 @@ export const themeConfig: ThemeConfig = {
|
|||
google: 'AUCrz5F1e5qbnmKKDXl2Sf8u6y0kOpEO1wLs6HMMmlM',
|
||||
// bing webmaster tools
|
||||
// docs: https://www.bing.com/webmasters
|
||||
bing: '',
|
||||
bing: '64708CD514011A7965C84DDE1D169F87',
|
||||
// yandex webmaster
|
||||
// docs: https://webmaster.yandex.com
|
||||
yandex: '',
|
||||
|
@ -126,7 +126,6 @@ export const themeConfig: ThemeConfig = {
|
|||
// apiflash access key
|
||||
// automatically generate website screenshots for open graph preview images
|
||||
// get your access key at: https://apiflash.com/
|
||||
// check your open graph at: https://orcascan.com/tools/open-graph-validator
|
||||
apiflashKey: '',
|
||||
},
|
||||
// SEO SETTINGS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> END
|
||||
|
@ -145,7 +144,7 @@ export const themeConfig: ThemeConfig = {
|
|||
},
|
||||
{
|
||||
name: 'Twitter',
|
||||
url: 'https://x.com/astrodotbuild',
|
||||
url: 'https://x.com/radishzz_',
|
||||
},
|
||||
// {
|
||||
// name: 'Email',
|
||||
|
@ -163,7 +162,7 @@ export const themeConfig: ThemeConfig = {
|
|||
// docs: https://docs.astro.build/en/guides/prefetch/#prefetch-strategies
|
||||
linkPrefetch: 'viewport', // hover, tap, viewport, load
|
||||
// comment server url
|
||||
commentURL: 'https://comment.radishzz.cc',
|
||||
commentURL: 'https://retypeset-comment.radishzz.cc',
|
||||
// image hosting url
|
||||
imageHostURL: 'https://image.radishzz.cc',
|
||||
// custom google analytics js
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
lang: ja
|
||||
---
|
||||
|
||||
Retypeset は[Astro](https://astro.build/)フレームワークをベースにした静的ブログテーマで、[Typography](https://astro-theme-typography.vercel.app/)からインスピレーションを得ています。新しい視覚的標準を確立し、すべてのページのレイアウトを再考することで、紙の本のような読書体験を提供し、タイポグラフィの美しさを蘇らせます。細部へのこだわりと、洗練された空間デザインが特徴です。
|
||||
Retypeset、日本語では「再組版」と呼ばれる、[Astro](https://astro.build/)フレームワークをベースにした静的ブログテーマで、[Typography](https://astro-theme-typography.vercel.app/)からインスピレーションを得ています。新しい視覚的な規範を確立し、すべてのページのレイアウトを再構成することで、紙の書籍のような読書体験を提供し、版面の美しさを蘇らせます。細部にまでこだわり、限られたスペースの中に洗練された優雅さを表現しています。
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
lang: zh-tw
|
||||
---
|
||||
|
||||
Retypeset 是一款基於[Astro](https://astro.build/)框架的靜態博客主題,設計靈感來自[Typography](https://astro-theme-typography.vercel.app/)。本主題通過建立全新的視覺規範,對所有頁面進行重新編排,打造紙質書頁般的閱讀體驗,再現版式之美。所見皆為細節,方寸盡顯優雅。
|
||||
Retypeset,中文名為重新編排,是一款基於[Astro](https://astro.build/)框架的靜態部落格主題,設計靈感來自[Typography](https://astro-theme-typography.vercel.app/)。本主題通過建立全新的視覺規範,對所有頁面進行重新編排,打造紙質書頁般的閱讀體驗,再現版式之美。所見皆為細節,方寸盡顯優雅。
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
lang: zh
|
||||
---
|
||||
|
||||
Retypeset 是一款基于[Astro](https://astro.build/)框架的静态博客主题,设计灵感来自[Typography](https://astro-theme-typography.vercel.app/)。本主题通过建立全新的视觉规范,对所有页面进行重新编排,打造纸质书页般的阅读体验,再现版式之美。所见皆为细节,方寸尽显优雅。
|
||||
Retypeset,中文名为重新编排,是一款基于[Astro](https://astro.build/)框架的静态博客主题,设计灵感来自[Typography](https://astro-theme-typography.vercel.app/)。本主题通过建立全新的视觉规范,对所有页面进行重新编排,打造纸质书页般的阅读体验,再现版式之美。所见皆为细节,方寸尽显优雅。
|
||||
|
|
|
@ -8,4 +8,4 @@ lang: ja
|
|||
abbrlink: theme-guide
|
||||
---
|
||||
|
||||
Retypeset は [Astro](https://astro.build/) フレームワークをベースにした静的ブログテーマで、[Typography](https://astro-theme-typography.vercel.app/) からインスピレーションを得ています。新しい視覚的標準を確立し、すべてのページのレイアウトを再考することで、紙の本のような読書体験を提供し、タイポグラフィの美しさを蘇らせます。細部へのこだわりと、洗練された空間デザインが特徴です。
|
||||
Retypeset、日本語では「再組版」と呼ばれる、[Astro](https://astro.build/) フレームワークをベースにした静的ブログテーマで、[Typography](https://astro-theme-typography.vercel.app/) からインスピレーションを得ています。新しい視覚的な規範を確立し、すべてのページのレイアウトを再構成することで、紙の書籍のような読書体験を提供し、版面の美しさを蘇らせます。細部にまでこだわり、限られたスペースの中に洗練された優雅さを表現しています。
|
||||
|
|
|
@ -8,4 +8,4 @@ lang: zh-tw
|
|||
abbrlink: theme-guide
|
||||
---
|
||||
|
||||
Retypeset 是一款基於 [Astro](https://astro.build/) 框架的靜態博客主題,設計靈感來自 [Typography](https://astro-theme-typography.vercel.app/)。本主題通過建立全新的視覺規範,對所有頁面進行重新編排,打造紙質書頁般的閱讀體驗,再現版式之美。所見皆為細節,方寸盡顯優雅。
|
||||
Retypeset,中文名為重新編排,是一款基於 [Astro](https://astro.build/) 框架的靜態部落格主題,設計靈感來自 [Typography](https://astro-theme-typography.vercel.app/)。本主題通過建立全新的視覺規範,對所有頁面進行重新編排,打造紙質書頁般的閱讀體驗,再現版式之美。所見皆為細節,方寸盡顯優雅。
|
||||
|
|
|
@ -8,4 +8,4 @@ lang: zh
|
|||
abbrlink: theme-guide
|
||||
---
|
||||
|
||||
Retypeset 是一款基于[Astro](https://astro.build/)框架的静态博客主题,设计灵感来自[Typography](https://astro-theme-typography.vercel.app/)。本主题通过建立全新的视觉规范,对所有页面进行重新编排,打造纸质书页般的阅读体验,再现版式之美。所见皆为细节,方寸尽显优雅。
|
||||
Retypeset,中文名为重新编排,是一款基于[Astro](https://astro.build/)框架的静态博客主题,设计灵感来自[Typography](https://astro-theme-typography.vercel.app/)。本主题通过建立全新的视觉规范,对所有页面进行重新编排,打造纸质书页般的阅读体验,再现版式之美。所见皆为细节,方寸尽显优雅。
|
||||
|
|
|
@ -2,6 +2,7 @@ export const ui = {
|
|||
'zh': {
|
||||
title: '重新编排',
|
||||
subtitle: '再现版式之美',
|
||||
description: 'Retypeset,中文名为重新编排,是一款基于Astro框架的静态博客主题,设计灵感来自Typography。本主题通过建立全新的视觉规范,对所有页面进行重新编排,打造纸质书页般的阅读体验,再现版式之美。所见皆为细节,方寸尽显优雅。',
|
||||
posts: '文章',
|
||||
tags: '标签',
|
||||
about: '关于',
|
||||
|
@ -9,6 +10,7 @@ export const ui = {
|
|||
'zh-tw': {
|
||||
title: '重新編排',
|
||||
subtitle: '再現版式之美',
|
||||
description: 'Retypeset,中文名為重新編排,是一款基於Astro框架的靜態部落格主題,設計靈感來自Typography。本主題通過建立全新的視覺規範,對所有頁面進行重新編排,打造紙質書頁般的閱讀體驗,再現版式之美。所見皆為細節,方寸盡顯優雅。',
|
||||
posts: '文章',
|
||||
tags: '標籤',
|
||||
about: '關於',
|
||||
|
@ -16,6 +18,7 @@ export const ui = {
|
|||
'ja': {
|
||||
title: '再組版',
|
||||
subtitle: '印刷の美を甦らせる',
|
||||
description: 'Retypeset、日本語では「再組版」と呼ばれる、Astroフレームワークをベースにした静的ブログテーマで、Typographyからインスピレーションを得ています。新しい視覚的な規範を確立し、すべてのページのレイアウトを再構成することで、紙の書籍のような読書体験を提供し、版面の美しさを蘇らせます。細部にまでこだわり、限られたスペースの中に洗練された優雅さを表現しています。',
|
||||
posts: '記事',
|
||||
tags: 'タグ',
|
||||
about: '概要',
|
||||
|
@ -23,6 +26,7 @@ export const ui = {
|
|||
'en': {
|
||||
title: 'Retypeset',
|
||||
subtitle: 'Revive the beauty of typography',
|
||||
description: 'Retypeset is a static blog theme based on the Astro framework, inspired by Typography. 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.',
|
||||
posts: 'Posts',
|
||||
tags: 'Tags',
|
||||
about: 'About',
|
||||
|
@ -30,6 +34,7 @@ export const ui = {
|
|||
'es': {
|
||||
title: 'Retipografía',
|
||||
subtitle: 'Reviviendo la belleza tipográfica',
|
||||
description: 'Retypeset es un tema de blog estático basado en el framework Astro, inspirado en Typography. Retypeset establece un nuevo estándar visual y reimagina la disposición de todas las páginas, ofreciendo una experiencia de lectura similar a la de los libros impresos, reviviendo la belleza de la tipografía. Detalles en cada mirada, elegancia en cada espacio.',
|
||||
posts: 'Artículos',
|
||||
tags: 'Etiquetas',
|
||||
about: 'Sobre',
|
||||
|
@ -37,6 +42,7 @@ export const ui = {
|
|||
'ru': {
|
||||
title: 'Переверстка',
|
||||
subtitle: 'Возрождая красоту типографики',
|
||||
description: 'Retypeset — это статическая тема блога, основанная на фреймворке Astro и вдохновленная Typography. Retypeset устанавливает новый визуальный стандарт и переосмысливает компоновку всех страниц, предлагая опыт чтения, подобный бумажным книгам, возрождая красоту типографики. Детали в каждом взгляде, элегантность в каждом пространстве.',
|
||||
posts: 'Посты',
|
||||
tags: 'Теги',
|
||||
about: 'О себе',
|
||||
|
|
|
@ -22,11 +22,12 @@ const { google = '', bing = '', yandex = '', baidu = '' } = verification
|
|||
const { commentURL = '', imageHostURL = '', customGoogleAnalyticsJS = '', customUmamiAnalyticsJS = '' } = themeConfig.preload
|
||||
|
||||
const initMetaTheme = mode === 'dark' ? darkMode : lightMode
|
||||
const headTitle = i18nTitle ? currentUI.title : title
|
||||
const headSubtitle = i18nTitle ? currentUI.subtitle : subtitle
|
||||
const siteTitle = i18nTitle ? currentUI.title : title
|
||||
const siteSubtitle = i18nTitle ? currentUI.subtitle : subtitle
|
||||
const siteDescription = i18nTitle ? currentUI.description : description
|
||||
|
||||
const pageTitle = postTitle ? `${postTitle} | ${headTitle}` : `${headTitle} - ${headSubtitle}`
|
||||
const pageDescription = postDescription || description
|
||||
const pageTitle = postTitle ? `${postTitle} | ${siteTitle}` : `${siteTitle} - ${siteSubtitle}`
|
||||
const pageDescription = postDescription || siteDescription
|
||||
const pageImage = postSlug
|
||||
? `${url}/og/${postSlug}.png`
|
||||
: apiflashKey
|
||||
|
|
2
src/types/index.d.ts
vendored
2
src/types/index.d.ts
vendored
|
@ -7,8 +7,8 @@ export interface ThemeConfig {
|
|||
site: {
|
||||
title: string
|
||||
subtitle: string
|
||||
i18nTitle: boolean
|
||||
description: string
|
||||
i18nTitle: boolean
|
||||
author: string
|
||||
url: string
|
||||
favicon: string
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue