Skip to content

Commit

Permalink
style: format code
Browse files Browse the repository at this point in the history
  • Loading branch information
richerfu committed Jun 19, 2024
1 parent 0616e6d commit 0ddd236
Show file tree
Hide file tree
Showing 7 changed files with 92 additions and 90 deletions.
10 changes: 5 additions & 5 deletions .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { shared } from "./shared";
import { en, zh } from "./i18n";

export default defineConfig({
...shared,
locales: {
root: { label: "简体中文", ...zh },
en: { label: "English", ...en },
},
...shared,
locales: {
root: { label: "简体中文", ...zh },
en: { label: "English", ...en },
},
});
5 changes: 4 additions & 1 deletion .vitepress/i18n/en/Ecosystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ export const EcosystemSideBar: DefaultTheme.SidebarItem[] = [
text: "Polyfill",
collapsed: false,
items: [
{ text: "AbortController", link: "/en/ecosystem/polyfill/abort-controller" },
{
text: "AbortController",
link: "/en/ecosystem/polyfill/abort-controller",
},
],
},
{
Expand Down
66 changes: 33 additions & 33 deletions .vitepress/i18n/en/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,37 @@ import { EcosystemSideBar } from "./Ecosystem";
import { BlogSideBar } from "./Blog";

export const en = defineConfig({
lang: "en-US",
description:
"A framework for building compiled OpenHarmony SDK in Rust via Node-API(Forked from napi-rs)",
themeConfig: {
nav: [
{ text: "Home", link: "/en" },
{ text: "Docs", link: "/en/docs/basic" },
{ text: "Ecosystem", link: "/en/ecosystem/" },
{ text: "Community", link: "/en/community/" },
{ text: "Blog", link: "/en/blog/" },
{
text: "About",
items: [
{ text: "Logo", link: "/en/about/" },
{ text: "Issue", link: "https://github.com/ohos-rs/example/issues" },
],
},
],
sidebar: {
"/en/docs": BasicSideBar,
"/en/ecosystem": EcosystemSideBar,
"/en/blog": BlogSideBar,
"/en/about": [],
},
editLink: {
pattern:
"https://github.com/ohos-rs/ohos-rs.github.io/tree/master/src/:path",
text: "Edit this page on GitHub",
},
lastUpdated: {
text: "Last updated",
},
},
lang: "en-US",
description:
"A framework for building compiled OpenHarmony SDK in Rust via Node-API(Forked from napi-rs)",
themeConfig: {
nav: [
{ text: "Home", link: "/en" },
{ text: "Docs", link: "/en/docs/basic" },
{ text: "Ecosystem", link: "/en/ecosystem/" },
{ text: "Community", link: "/en/community/" },
{ text: "Blog", link: "/en/blog/" },
{
text: "About",
items: [
{ text: "Logo", link: "/en/about/" },
{ text: "Issue", link: "https://github.com/ohos-rs/example/issues" },
],
},
],
sidebar: {
"/en/docs": BasicSideBar,
"/en/ecosystem": EcosystemSideBar,
"/en/blog": BlogSideBar,
"/en/about": [],
},
editLink: {
pattern:
"https://github.com/ohos-rs/ohos-rs.github.io/tree/master/src/:path",
text: "Edit this page on GitHub",
},
lastUpdated: {
text: "Last updated",
},
},
});
4 changes: 2 additions & 2 deletions .vitepress/i18n/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from './en';
export * from './zh';
export * from "./en";
export * from "./zh";
65 changes: 32 additions & 33 deletions .vitepress/i18n/zh/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,36 @@ import { EcosystemSideBar } from "./Ecosystem";
import { BlogSideBar } from "./Blog";

export const zh = defineConfig({
lang: 'zh-Hans',
description:
"基于 Rust 实现的鸿蒙原生模块开发框架(基于 napi-rs 实现)",
themeConfig: {
nav: [
{ text: "主页", link: "/" },
{ text: "文档", link: "/docs/basic" },
{ text: "生态", link: "/ecosystem/" },
{ text: "社区", link: "/community/" },
{ text: "博客", link: "/blog/" },
{
text: "关于",
items: [
{ text: "Logo", link: "/about/" },
{ text: "Issue", link: "https://github.com/ohos-rs/example/issues" },
],
},
],
sidebar: {
"/docs": BasicSideBar,
"/ecosystem": EcosystemSideBar,
"/blog": BlogSideBar,
"/about": [],
},
editLink: {
pattern:
"https://github.com/ohos-rs/ohos-rs.github.io/tree/master/src/:path",
text: "编辑本页",
},
lastUpdated: {
text: "最新更新于",
},
},
lang: "zh-Hans",
description: "基于 Rust 实现的鸿蒙原生模块开发框架(基于 napi-rs 实现)",
themeConfig: {
nav: [
{ text: "主页", link: "/" },
{ text: "文档", link: "/docs/basic" },
{ text: "生态", link: "/ecosystem/" },
{ text: "社区", link: "/community/" },
{ text: "博客", link: "/blog/" },
{
text: "关于",
items: [
{ text: "Logo", link: "/about/" },
{ text: "Issue", link: "https://github.com/ohos-rs/example/issues" },
],
},
],
sidebar: {
"/docs": BasicSideBar,
"/ecosystem": EcosystemSideBar,
"/blog": BlogSideBar,
"/about": [],
},
editLink: {
pattern:
"https://github.com/ohos-rs/ohos-rs.github.io/tree/master/src/:path",
text: "编辑本页",
},
lastUpdated: {
text: "最新更新于",
},
},
});
30 changes: 15 additions & 15 deletions .vitepress/shared.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { defineConfig } from "vitepress";

export const shared = defineConfig({
title: "ohos-rs",
srcDir: "./src",
markdown: {
image: {
lazyLoading: true,
},
},
head: [["link", { rel: "icon", href: "/favicon.ico" }]],
themeConfig: {
logo: "/logo.svg",
socialLinks: [{ icon: "github", link: "https://github.com/ohos-rs" }],
search: {
provider: "local",
},
},
title: "ohos-rs",
srcDir: "./src",
markdown: {
image: {
lazyLoading: true,
},
},
head: [["link", { rel: "icon", href: "/favicon.ico" }]],
themeConfig: {
logo: "/logo.svg",
socialLinks: [{ icon: "github", link: "https://github.com/ohos-rs" }],
search: {
provider: "local",
},
},
});
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"files": {
"include": ["src/**/*.md", ".vitepress/**/*.mts"]
"include": ["src/**/*.md", ".vitepress/**/*.ts"]
}
}

0 comments on commit 0ddd236

Please sign in to comment.