Skip to content

Commit

Permalink
Merge pull request #28 from BlizzBolts/fix/support-cn-routes
Browse files Browse the repository at this point in the history
Fix/support cn routes
  • Loading branch information
null51_ authored Jul 7, 2022
2 parents 65a81e2 + c0c2f36 commit 56e0d0a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `Fixed` for any bug fixes.
- `Security` in case of vulnerabilities.

## [0.10.1] - 2022-07-07

### Fixed

- Support Chinese as Route path with `encodeURI`
- exclude @mdx-js/react from vite pre-bundling

## [0.10.0] - 2022-07-06

### Changed
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@blizzbolts/docit",
"version": "0.10.0",
"version": "0.10.1-beta4",
"license": "MIT",
"bin": {
"docit": "bin/docit.js"
Expand Down
4 changes: 2 additions & 2 deletions src/client/components/Document/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { Suspense } from "react";
import React, { Suspense, useEffect, useMemo, useRef, useState } from "react";
import { MDXProvider } from "@mdx-js/react";
import { StyledMarkdown, StyledDocument } from "./styled";
import { ShowCode } from "../../built-in/ShowCode";
import { ApiTable } from "../../built-in/ApiTable";
import { ShowCode } from "../../built-in/ShowCode";
import { useAnchors } from "../../hooks/useAnchors";
import { Toc } from "../Toc";

Expand Down
2 changes: 1 addition & 1 deletion src/client/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const Root = () => {
return (
<Route
key={route.path}
path={route.path}
path={encodeURI(route.path)}
element={
route.path !== "/__sandbox__" ? (
<App>
Expand Down
1 change: 1 addition & 0 deletions src/node/plugins/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export const docit = async (config: ResolvedUserConfig): Promise<Plugin[]> => {
"highlight.js",
"qrcode",
],
exclude: ["@mdx-js/react"],
},
build: {
outDir: path.resolve(process.cwd(), "./docs-dist"),
Expand Down

0 comments on commit 56e0d0a

Please sign in to comment.