Skip to content

Commit

Permalink
Fixed sitemap item url error
Browse files Browse the repository at this point in the history
  • Loading branch information
ihavecoke committed Jun 19, 2024
1 parent 2a42c1e commit f255b62
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
18 changes: 7 additions & 11 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const darkCodeTheme = require("prism-react-renderer/themes/vsDark");
import type { Config } from "@docusaurus/types";
import type * as Preset from "@docusaurus/preset-classic";
import process from "node:process";
import { baseURLPrefix } from "./src/constant";

const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const openapiDomain = "https://open.longportapp.com";
Expand All @@ -19,12 +18,12 @@ const ossEnv = isDev ? "/" : proxy;
const targetPortalPath = proxy === "canary" ? "https://m.longbridge.xyz" : "https://m.lbkrs.com";
const localAPIProxyPath = "/dev-proxy";
const apiProxyUrl = `${isDev ? localAPIProxyPath : targetPortalPath}/api/forward`;
const portAIProxyUrl = isDev ? 'http://localhost:4040/dev-proxy' : undefined;
const portAIProxyUrl = isDev ? "http://localhost:4040/dev-proxy" : undefined;

const config: Config = {
title: "LongPort wiki",
title: "LongPort",
url: "https://longportapp.com",
baseUrl: baseURLPrefix,
baseUrl: "/",
organizationName: "longportapp",
projectName: "wiki-docs",
baseUrlIssueBanner: false,
Expand Down Expand Up @@ -96,8 +95,6 @@ const config: Config = {
};
}
],


presets: [
[
"classic",
Expand All @@ -117,16 +114,17 @@ const config: Config = {
return await items.map((item) => {
return item.url = item.url
.replace("zh-CN/zh-CN", "zh-CN")
.replace("zh-CN/en/learn", "zh-CN/learn")
.replace("en/en", "en")
.replace("zh-HK/zh-HK", "zh-HK");
.replace("zh-HK/zh-HK", "zh-HK")
.replace("zh-HK/en/learn", "zh-HK/learn");
});
}
}

} satisfies Preset.Options
]
],

themeConfig:
/** @type {import("@docusaurus/preset-classic").ThemeConfig} */
{
Expand Down Expand Up @@ -157,9 +155,7 @@ const config: Config = {
{
to: openapiDomain,
position: "left",
target: "_self",
label: "开发者认证",
activeBaseRegex: "^/$"
label: "开发者认证"
},
{
to: communityDomain,
Expand Down
1 change: 0 additions & 1 deletion src/constant.ts

This file was deleted.

0 comments on commit f255b62

Please sign in to comment.