Skip to content

Commit

Permalink
feat: i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin3go committed Jul 28, 2024
1 parent c9c2774 commit dd679d7
Show file tree
Hide file tree
Showing 413 changed files with 72,835 additions and 526 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Deploy
on:
workflow_dispatch: {}
push:
branches:
- dev
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: pnpm/action-setup@v2
with:
version: 8.6.0
- uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: Build
run: pnpm docs:build
- uses: actions/configure-pages@v2
- uses: actions/upload-pages-artifact@v1
with:
path: docs/.vitepress/dist
- name: Deploy
id: deployment
uses: actions/deploy-pages@v1
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
push:
branches:
- master
- release

name: Release

Expand Down
156 changes: 0 additions & 156 deletions CHANGELOG.md

This file was deleted.

70 changes: 0 additions & 70 deletions README.ja.md

This file was deleted.

15 changes: 10 additions & 5 deletions docs/.vitepress/config/en.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
import { defineConfig} from 'vitepress'

import { createSideBar } from "../theme/utils/createSideBar";
import { createSideBarEN } from "../theme/utils/createSideBar";

// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "Justin3go",
description: "A T-shaped front-end developer who is committed to deepening expertise in the technical field, focuses on independent development, enjoys working with Vue.js and Nest.js, and has some knowledge of Python, search engines, NLP, Web3, and back-end development.",
description: "A T-shaped front-end developer who is committed to deepening expertise in the technical field, focuses on independent development and AI, enjoys working with Vue.js and Nest.js, and has some knowledge of Python, search engines, NLP, Web3, and back-end development.",
lang: "en-US", //语言

themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [
{ text: "Home", link: "/en/" },
{ text: "Notes", link: "/en/notes/", activeMatch: '/en/notes/' },
{ text: "About", link: "/en/about", activeMatch: '/en/about' },
],

sidebar: createSideBar(),
sidebar: createSideBarEN(),

socialLinks: [
{ icon: 'x', link: 'https://x.com/Justin1024go' },
{ icon: 'github', link: 'https://github.com/Justin3go/FAV0' },
{ icon: 'github', link: 'https://github.com/Justin3go/justin3go.com' },
{
icon: {
svg: '<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><title>RSS</title><path d="M108.56,342.78a60.34,60.34,0,1,0,60.56,60.44A60.63,60.63,0,0,0,108.56,342.78Z"/><path d="M48,186.67v86.55c52,0,101.94,15.39,138.67,52.11s52,86.56,52,138.67h86.66C325.33,312.44,199.67,186.67,48,186.67Z"/><path d="M48,48v86.56c185.25,0,329.22,144.08,329.22,329.44H464C464,234.66,277.67,48,48,48Z"/></svg>',
Expand All @@ -25,7 +30,7 @@ export default defineConfig({
],

editLink: {
pattern: "https://github.com/Justin3go/FAV0/edit/master/docs/:path"
pattern: "https://github.com/Justin3go/justin3go.com/edit/master/docs/:path"
},
},
})
4 changes: 2 additions & 2 deletions docs/.vitepress/config/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import AutoImport from 'unplugin-auto-import/vite';
import Components from 'unplugin-vue-components/vite';
import { TDesignResolver } from 'unplugin-vue-components/resolvers';

import { createRssFileZH, createRssFileEN } from "../utils/rss";
import { handleHeadMeta } from "../utils/handleHeadMeta";
import { createRssFileZH, createRssFileEN } from "../theme/utils/rss";
import { handleHeadMeta } from "../theme/utils/handleHeadMeta";
import { search as zhSearch } from './zh'

// https://vitepress.dev/reference/site-config
Expand Down
14 changes: 7 additions & 7 deletions docs/.vitepress/config/zh.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { DefaultTheme, defineConfig } from 'vitepress'

import { createSideBar } from "../theme/utils/createSideBar";
import { createSideBarZH } from "../theme/utils/createSideBar";

// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "Justin3go",
description: "坚持深耕技术领域的T型前端程序员, 关注独立开发,喜欢Vuejs、Nestjs, 还会点Python、搜索引擎、NLP、Web3、后端",
description: "坚持深耕技术领域的T型前端程序员, 关注独立开发与AI,喜欢Vuejs、Nestjs, 还会点Python、搜索引擎、NLP、Web3、后端",
lang: "zh-Hans", //语言

themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [
{ text: "首页", link: "/" },
{ text: "笔记", link: "/笔记/", activeMatch: '/笔记/' },
{ text: "关于", link: "/about/", activeMatch: '/about/' },
{ text: "笔记", link: "/notes/", activeMatch: '/notes/' },
{ text: "关于", link: "/about", activeMatch: '/about' },
],
docFooter: {
prev: '上一篇',
Expand All @@ -22,11 +22,11 @@ export default defineConfig({
outlineTitle: "当前页面",
lastUpdatedText: "最近更新时间",

sidebar: createSideBar(),
sidebar: createSideBarZH(),

socialLinks: [
{ icon: 'x', link: 'https://x.com/Justin1024go' },
{ icon: 'github', link: 'https://github.com/Justin3go/FAV0' },
{ icon: 'github', link: 'https://github.com/Justin3go/justin3go.com' },
{
icon: {
svg: '<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><title>RSS</title><path d="M108.56,342.78a60.34,60.34,0,1,0,60.56,60.44A60.63,60.63,0,0,0,108.56,342.78Z"/><path d="M48,186.67v86.55c52,0,101.94,15.39,138.67,52.11s52,86.56,52,138.67h86.66C325.33,312.44,199.67,186.67,48,186.67Z"/><path d="M48,48v86.56c185.25,0,329.22,144.08,329.22,329.44H464C464,234.66,277.67,48,48,48Z"/></svg>',
Expand All @@ -36,7 +36,7 @@ export default defineConfig({
],

editLink: {
pattern: "https://github.com/Justin3go/FAV0/edit/master/docs/:path",
pattern: "https://github.com/Justin3go/justin3go.com/edit/master/docs/:path",
text: "在GitHub上编辑此页",
},
returnToTopLabel: "回到顶部",
Expand Down
Loading

0 comments on commit dd679d7

Please sign in to comment.