Site Configuration Guide
.env
-
Run the command to create
.envfile:cp .env.example .env -
Modify or add variables:
Variable Description PUBLIC_TIMEZONE*Default display timezone, refer to Timezone List *indicates required options.
astro.config.ts
site- Site URLi18nlocales- List of supported languagesdefaultLocale- Default language
markdownremarkPlugins- Markdown processing pluginsrehypePlugins- HTML processing plugins
site.config.json
title- Site titleprologue- Homepage tagline, supports\nline breaksauthor- string - Author name
- object
name- Author nameemail- Author emaillink- Author personal website
description- Site descriptioncopyright- Copyright informationtype- CC license typeyear- Copyright year or year range
feed- Feedsection- Feed content sections*- All sections- array
note- Note sectionjotting- Jotting section
limit- Content quantity limit for feeds
Icon Generation
It is recommended to use RealFaviconGenerator to generate icons, and copy all the contents of the downloaded and extracted files to the /public directory.
The generated file list is as follows:
apple-touch-icon.pngfavicon-96x96.pngfavicon.icofavicon.svgsite.webmanifestweb-app-manifest-192x192.pngweb-app-manifest-512x512.png
The content in <head> has been adapted according to RealFaviconGenerator's prompts and can be modified as needed.
After modification and deployment, you can use Favicon checker to verify.
Homepage Logo
The reference location is in src/pages/[...locale]/index.astro, which uses SVG format icons imported by the astro-icon library by default.
<Icon name="site-logo" size={100} is:inline />
Configuration can be done through the following three methods:
- Replace
src/icons/site-logo.svgwith an SVG file, which will be automatically read and applied.- It is recommended to use
stroke="currentColor"to adapt to theme color changes.
- It is recommended to use
- Use Iconify icon sets, referenced in the format
<PREFIX>:<ICON>. - Directly modify to image import or remove this part of the content.
Internationalization (i18n) Configuration
The theme supports multi-language switching, with the default language being English (en).
If you need to change the default language, please modify i18n.defaultLocale, noting that the value must be selected from i18n.locales.
To add a new language, please create the corresponding translation file in the src/i18n directory and add that language to i18n.locales in astro.config.ts.
Then modify the src/i18n/index.ts file:
// Import the translation file for the new language
import zhCN from "./zh-cn.yaml";
// Add the new language to the locale mapping list
const translations = {
...,
"zh-cn": zhCN
};