็ฎไฝไธญๆ | ็น้ซไธญๆ | English | ๆฅๆฌ่ช
For update logs, please see Site Introduction Page
View in site https://jaymushui.github.io/about/site#site-history-changelog
- ๐จ Static Blog Framework: Valaxy v0.23.4
- ๐ฏ Blog Theme: Yun v0.23.4
For custom modifications to the current framework, please see this section and subsequent chapters
- ๐ฆ Package Manager: pnpm
- โก Build Tool: Vite
- ๐ Development Language: TypeScript
- ๐จ Style Preprocessor: SCSS
- โจ Code Standards: ESLint + Prettier
- ๐ Frontend Framework: Vue 3
- ๐ฃ๏ธ Route Management: Vue Router
- ๐ Internationalization: Vue I18n
- ๐ Markdown Parser: Markdown-it
- ๐ Math Formula Rendering: KaTeX
- ๐จ Color Processing: TinyColor
- ๐ Analytics: Google Analytics
- ๐ Currently using Github Pages: https://jaymushui.github.io
*Not enabled: Vercel, Netlify, etc.
- ๐ผ๏ธ Telegraph + Cloudflare Pages: Static Resource CDN Hosting ๐
- ๐ Related Projects:
- https://mushui.pages.dev/(Social Profile)[Not Open Source]
- ๐คซ
Valaxy and this theme support the following frontmatter fields, all with source code references or official conventions for easy tracing and maintenance:
title: Article title (Valaxy convention, supported by all components)icon: Icon before title (YunPostCard.vue:27, Valaxy convention)description: Article description (YunPostMeta.vue:22)author: Author (YunPostMeta.vue:23)date: Publication time (YunPostMeta.vue:20, Valaxy convention)updated: Update time (YunPostMeta.vue:21, Valaxy convention)path: Article path (Valaxy convention) โabbrlink: Permanent link (Valaxy convention) โ
toc: Whether to show table of contents (Valaxy convention)aside: Whether to show right sidebar (Valaxy convention)markdownClass: Custom Markdown style (Valaxy convention) โpageTitleClass: Page title style (Valaxy convention) โpostTitleClass: Custom title style in article list (YunPostCard.vue:40)
categories: Categories (YunPostCard.vue:115, Valaxy convention)tags: Tags (YunPostCard.vue:117, Valaxy convention)
excerpt: Custom excerpt (YunPostCard.vue:97, Valaxy convention)excerpt_type: Excerpt type (YunPostCard.vue:96, Valaxy convention)cover: Cover image (YunPostCard.vue:73, Valaxy convention)
nav: Whether to show article navigation (Valaxy convention)top: Top priority (YunPostMeta.vue:30, Valaxy convention)end: Whether finished (Valaxy convention)
draft: Whether draft (Valaxy convention)hide: Whether hidden (Valaxy convention)comment: Whether to show comments (Valaxy convention)time_warning: Update time warning (Valaxy convention) โ [Globally disabled]
wordCount: Word count (YunPostMeta.vue:18, auto-generated)readingTime: Reading time (YunPostMeta.vue:19, auto-generated)
type: Card type (YunPostCard.vue:26, Valaxy convention)url: Override article URL, direct jump (YunPostCard.vue:103, Valaxy convention)
image: Schema.org image object (Valaxy convention)albums: Album array (Valaxy convention)photos: Photo array (Valaxy convention)medium_zoom: Whether to use medium-zoom image scaling (Valaxy convention)
katex: Whether to use KaTeX math formulas (Valaxy convention)codepen: Whether to use CodePen (Valaxy convention)codeHeightLimit: Code block height limit (Valaxy convention)
encrypt: Whether to enable encryption (Valaxy convention)password: Encryption password (Valaxy convention)password_hint: Password hint (Valaxy convention)gallery_password: Album password (Valaxy convention)encryptedContent: Encrypted content (Valaxy convention)partiallyEncryptedContents: Partially encrypted content (Valaxy convention)encryptedPhotos: Encrypted album (Valaxy convention)
from: Source path for client redirect (Valaxy convention)
YunPostMeta.vue,YunPostCard.vue, etc. are project custom component source files.Valaxy conventionindicates that the field is explicitly supported in Valaxy official themes, plugins, or documentation.Auto-generatedindicates that the field is automatically generated by Valaxy or related plugins, no need to manually fill in.
---
title:
zh-CN: ๆ ้ข
en: title
icon: i-carbon-moon
color: green
description:
zh-CN: ๆ่ฟฐ
en: description
author:
zh-CN: ๆๆ
en: Li Ming
date: 2077-01-01 01:12:00
updated: 2080-04-18 01:12:00
toc: true
aside: true
tags:
- {"zh-CN": "ๆ ็ญพ1", "en": "Tag1"}
- {"zh-CN": "ๆ ็ญพ2", "en": "Tag2"}
categories:
- {"zh-CN": "็ฑปๅ", "en": "categories"}
---
## ไพ {lang=zh-CN}
## example {lang=zh-en}
::: zh-CN
ๆ็ซ ๅ
ๅฎน...
:::
::: en
The content of the article...
:::
<!-- more -->
::: zh-CN
ๆ็ซ ๅ
ๅฎน...
:::
::: en
The content of the article...
:::-
๐ Basic Configuration
url: Complete site URL, used for generating article permanent linkslang: Site default languagetitle: Site titlesubtitle: Site subtitledescription: Site descriptiontimezone: Site timezonelanguages: Optional language listfavicon: Site iconlastUpdated: Whether to show last update time
-
๐ค Author Information
author.name: Author nameauthor.avatar: Author avatarauthor.status: Status information (emoji and message)author.intro: Personal introductionauthor.email: Emailauthor.link: Personal homepage link
-
๐ Social Links
social: Social platform link array, supports custom icons and colors
-
๐ Search Configuration
search.enable: Whether to enable searchsearch.type: Search type (fuse/algolia/engine)fuse: fuse search configuration
-
๐ฌ Comment System
comment.enable: Whether to enable comments
-
๐ฐ Sponsor Configuration
sponsor.enable: Whether to enable sponsorshipsponsor.description: Sponsor description (supports multiple languages)sponsor.methods: Sponsor method configuration
-
๐ Statistics Configuration
statistics.enable: Whether to enable statisticsstatistics.readTime: Reading time configuration
-
๐จ Theme Style
type: Theme type ('strato' or 'nimbo')colors.primary: Theme colorvalaxyDarkOptions: Dark mode configuration
-
๐ฏ Homepage Configuration
banner: Homepage slogan configurationbg_image: Background image configuration
-
๐ญ Feature Modules
say: Say something configurationnotice: Notice configurationfireworks: Click fireworks effect configuration
-
๐ฑ Navigation Configuration
nav: Navigation bar configurationpages: Page configurationsidebar: Sidebar configurationmenu: Menu bar configuration
-
๐ฃ Footer Configuration
footer.since: Site creation timefooter.cloud: Footer cloud effectfooter.icon: Footer icon configurationfooter.powered: Whether to show Powered byfooter.beian: ICP filing information configuration
-
๐ Article Configuration
types: Custom article card typesoutlineTitle: Article table of contents title
# Install dependencies
pnpm i
# Development preview
pnpm dev
# Build (SSG version)
pnpm build
# Build (SPA version)
pnpm build:spa
# Build (SSG version, same as pnpm build)
pnpm build:ssg
# Generate RSS
pnpm rss
# Preview build results
pnpm serve
# Clean build files (custom command, implemented in scripts/clean.js)
# Deletes the following files:
# - public/feed.xml
# - public/atom.xml
# - public/feed.json
# - public/valaxy-fuse-list.json
# - dist/
pnpm clean# Code format check
pnpm lint
# Code formatting
pnpm format
# Type check
pnpm type-check# Add dependency
pnpm add <package-name>
# Add development dependency
pnpm add -D <package-name>
# Update dependencies
pnpm update
# Remove dependency
pnpm remove <package-name># Clean build cache
pnpm clean
# Clean dependencies
pnpm clean:all# Generate type declaration files
pnpm gen-types
# Run custom scripts
pnpm run <script-name>pnpm i: Install all project dependencies, including development dependenciespnpm dev: Start development server with hot reloadpnpm build: Build production code (SSG version), output todistdirectorypnpm build:spa: Build single page application versionpnpm build:ssg: Build static site versionpnpm rss: Generate RSS subscription filepnpm serve: Preview built production code
- After first cloning the project, run
pnpm ito install dependencies - Use
pnpm devto start development server - Make sure all code is saved before building
- If you encounter dependency issues, try deleting the
node_modulesdirectory and runpnpm iagain
pages/: All page contentposts/: Blog articlesabout/: About pages
components/: Custom Vue componentslayouts/: Custom layout componentsstyles/: Custom style fileslocales/: Internationalization language filesutils/: Utility functionstypes/: TypeScript type declarationssetup/: Application initialization settingsstores/: Pinia state managementplugins/: Custom pluginspublic/: Static resource filesdist/: Generated files after build
site.config.ts: Site configurationtheme.config.ts: Theme configurationvalaxy.config.ts: Valaxy framework configurationtsconfig.json: TypeScript configurationpackage.json: Project dependency configurationpnpm-lock.yaml: Dependency version lock file
.vscode/: VSCode editor configuration.github/: GitHub Actions workflow configuration.editorconfig: Editor common configuration.npmrc: NPM configuration.gitignore: Git ignore file configuration
.github/: Github deployment configurationvercel.json: Vercel deployment configurationnetlify.toml: Netlify deployment configurationnginx.conf: Nginx server configurationDockerfile: Docker container configuration.dockerignore: Docker ignore file
.valaxy/: Valaxy build cachenode_modules/: Dependency package directory
scripts/: Custom scriptsconfig/: Other configuration files
If RSS functionality is not needed, or to avoid RSS generation errors due to multilingual frontmatter, you can disable RSS auto-generation in the following way:
- Open the file
node_modules/.pnpm/valaxy@0.23.4_.../node_modules/valaxy/dist/chunk-OXTCPOR5.js. - Search for
rssModuleorbuild:after, find the following code:setup(node) { node.hook("build:after", async () => { //console.log(); //await build(node.options); return; }); }
- Comment out
await build(node.options);or directlyreturn;, so RSS files won't be automatically generated during build.
Note: This file will be overwritten after each valaxy dependency upgrade, requiring reoperation.
i18n.ts [๐ utils] ๐
- Function: Parse multilingual content, supporting object and string forms.
- Usage:
parseI18nContent({ 'zh-CN': 'Chinese', 'en': 'English' }) // Returns content corresponding to current language parseI18nContent('Plain text') // Returns string directly
formatTimestamp.ts [๐ utils] ๐
- Function: Format timestamp or date object to 'YYYY-MM-DD HH:mm:ss' format.
- Usage:
formatTimestamp(new Date()) // Returns formatted string of current time
shims.d.ts [๐ types] ๐
- Function: TypeScript type declaration file for extending module type definitions.
- Main Purpose:
- Declare module types for
.ymland.yamlfiles - Provide type support for Vue I18n
- Ensure TypeScript can correctly identify and type check YAML format language files
- Declare module types for
- Usage Scenarios:
- When project uses Vue I18n for internationalization
- When using YAML files to store configuration or language files
- When TypeScript support is needed for these file types
- File Content:
declare module '*.yml' { import { DefineLocaleMessage } from 'vue-i18n'; const messages: DefineLocaleMessage; export default messages; } declare module '*.yaml' { import { DefineLocaleMessage } from 'vue-i18n'; const messages: DefineLocaleMessage; export default messages; }
404.vue [๐ layouts] ๐
- Function: Display 404 error page with fun multilingual recipe display feature.
- Main Features:
- Multilingual Support: Provides recipe content in Simplified Chinese, Traditional Chinese, English, and Japanese
- Dynamic Switching: Supports dynamic switching display of recipe content in different languages
- Style Optimization:
- Add shadow effect to 404 numbers
- Custom button style with hover effect
- Optimize recipe content layout and spacing
categories.vue [๐ layouts] ๐
- Function: Category page layout, supporting multilingual category display and management.
- Main Features:
- Multilingual Support:
- Integrates
parseI18nContentutility function - Optimizes category name display logic
- Integrates
- Category Filtering:
- Supports object-form category data
- Optimizes URL parameter handling
- Category Merging:
- Implements multilingual category merge display
- Optimizes category count statistics
- Page Optimization:
- Adds transition animation effects
- Improves category list display method
- Multilingual Support:
tags.vue [๐ layouts] ๐
- Function: Tag page layout, supporting multilingual tag cloud display.
- Main Features:
- Multilingual Support:
- Integrates
parseI18nContentutility function - Optimizes tag name display logic
- Integrates
- Tag Style System:
- Dynamically calculates font size based on usage frequency
- Implements tag color gradient effect
- Uses TinyColor library for color mixing
- Tag Filtering:
- Supports object-form tag data
- Improves URL parameter handling
- Tag Merging:
- Implements multilingual tag merge display
- Optimizes tag count statistics
- Page Optimization:
- Adds transition animation effects
- Optimizes tag cloud layout
- Supports responsive design
- Multilingual Support:
index.scss [๐ styles] ๐
- Function: Define sidebar background image and dark mode styles.
- Usage:
// Sidebar background image style .yun-fullscreen-menu { position: relative; &::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: -1; background-image: url('https://cloudflare-imgbed-telegraph.pages.dev/file/MTYW_Nobi_With_Mu_20250514.webp'); background-position: bottom 0rem center; background-size: contain; background-repeat: no-repeat; opacity: 0.4; transition: all 0.3s ease; } } // Dark mode style html.dark { .yun-fullscreen-menu { &::before { background-image: url('https://cloudflare-imgbed-telegraph.pages.dev/file/MTYW_Onocle_CardGame_Mu_20250527.webp'); opacity: 0.8; } } }
The setup folder is used to store application initialization settings files, mainly for configuring Google Analytics tracking and other application-level settings.
- main.ts [๐ setup] ๐: Main application settings file, used for initializing application and installing Google Analytics tracking.
- gtag.ts [๐ setup] ๐: Google Analytics tracking settings, used for installing Google Analytics on client side and tracking routes.
These components are mainly used to support multilingual frontmatter for Markdown articles, implemented through the parseI18nContent utility function:
- YunPostCard.vue [๐ components] ๐: Article card component, supports multilingual title and content display
- YunPostCategories.vue [๐ components] ๐: Article category component, supports multilingual category names
- YunPostTags.vue [๐ components] ๐: Article tag component, supports multilingual tag names
- YunPostMeta.vue [๐ components] ๐: Article metadata component, supports multilingual description and author information
- YunNavMenuTitle.vue [๐ components] ๐: Navigation menu title component, supports multilingual display
- YunCategory.vue [๐ components] ๐: Category component, supports multilingual category names
- YunCategoryChildItem.vue [๐ components] ๐: Subcategory component, supports multilingual display
- YunPostNav.vue [๐ components] ๐: Article navigation component, supports multilingual
- YunPostsInfo.vue [๐ components] ๐: Article information component, supports multilingual display
- YunPostCollapseItem.vue [๐ components] ๐: Article collapse item component, supports multilingual content
These components are used for website access statistics and runtime display:
-
YunPostMeta.vue [๐ components] ๐:
- Integrates Busuanzi page view statistics
-
YunFooter.vue [๐ components] ๐:
- Displays website runtime (counted from deployment)
- Integrates Busuanzi total site access statistics
These components provide website features:
- YunBanner.vue [๐ components] ๐: Banner component, customizes animation display time, optimizes user experience
- YunSay.vue [๐ components] ๐: Say something component, integrates Google Translate API for automatic translation of hitokoto content, supports multilingual display
- YunNotice.vue [๐ components] ๐: Notice component, supports custom multilingual notice content in configuration file
- YunSponsor.vue [๐ components] ๐: Sponsor component, supports custom multilingual sponsor description in configuration file
These components are used for website overall layout and navigation, all integrated with multilingual support:
- YunLayoutPostTag.vue [๐ components] ๐: Tag cloud layout component, supports dynamic style calculation
- YunNavMenuItem.vue [๐ components] ๐: Navigation menu item component, supports multilingual display
- YunPageHeader.vue [๐ components] ๐: Page title component, supports multilingual title
- YunSidebarLinks.vue [๐ components] ๐: Sidebar links component, supports multilingual link text
- YunPrologueSquare.vue [๐ components] ๐: Prologue square component, supports multilingual content
- Supports custom multilingual configuration in
site.config.ts[๐ root] ๐ andtheme.config.ts[๐ root] ๐:- Notice module: Supports multilingual notice content
- Sponsor module: Supports multilingual sponsor description
- Uses
as anytype assertion solution to ensure functions correctly read multilingual configuration
For current valaxy 0.23.4 release Due to valaxy official type declaration limitations,
site.config.ts[๐ root] ๐ andtheme.config.ts[๐ root] ๐ need to useas anytype assertion for multilingual objects (like sponsor.description, notice.content), otherwise type errors will occur.
// site.config.ts
sponsor: {
enable: true,
description: {
'zh-CN': 'ๆๆฏๅญฆ็็ปๆ้ฑ๏ผๆฒกๆ่ฏด็คผ่ฒ็ๆๆ๏ผ',
'en': 'Student here, send moneyโโ no cap'
} as any,
// ...
}
// theme.config.ts
notice: {
enable: true,
hideInPages: false,
content: {
'zh-CN': 'โป็ฝฎ้กถ๏ผ Who am I ? | (UTC+8)2025-03-06 14:27:19',
'en': 'โปPinned: Who am I ? | (UTC+8)2025-03-06 14:27:19'
} as any,
}- This is because valaxy official type declarations only support string type for description/content, cannot directly pass objects.
- Using
as anycan bypass type checking, no problems in actual runtime. - If official type declarations upgrade to support object types, can remove
as any. - All components integrate
parseI18nContentutility function [๐ utils] ๐ for handling multilingual content - Supports using object form to define multilingual content in frontmatter:
title: zh-CN: ไธญๆๆ ้ข en: English Title description: zh-CN: ไธญๆๆ่ฟฐ en: English Description
-
Multilingual Real-time Switch Optimization
- Tag cloud component (YunLayoutPostTag.vue) multilingual real-time response
- Category page article list multilingual real-time switch
- Tag page article list multilingual real-time switch
- Optimize
i18n.tsutility function support for complex components
-
Multilingual Framework Extension
- Not understanding how valaxy framework itself supports more than two languages
- Complete language support in
localesdirectory (reserved corresponding key files):- Traditional Chinese (zh-TW) support
- Japanese (ja) support
- Design multilingual switch user interface
-
Local Search Strategy Issues
- The local search strategy of the fuse.js solution is not suitable for the current multilingual frontmatter articles.
- Issues such as being unable to search for detailed article content may occur on the built website, etc.