Skip to content

Commit

Permalink
Update some configurations and dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
wzf03 committed Feb 20, 2024
1 parent 90a22bc commit 837db67
Show file tree
Hide file tree
Showing 5 changed files with 725 additions and 696 deletions.
26 changes: 16 additions & 10 deletions docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@ import {
createPage,
Page,
} from "vuepress";
import { contests, problems } from "./data.json";
import { ContestsGroup, ProblemsGroup } from "../../src/index.ts";
import {
contests as untyped_contests,
problems as untyped_problems
} from "./data.json";

var contests: ContestsGroup = untyped_contests
var problems: ProblemsGroup = untyped_problems

function getSidebar(): SidebarConfigArray {
const sidebar: SidebarConfigArray = [];
Expand Down Expand Up @@ -82,17 +89,16 @@ ${problem.explanation}
## 参考答案
${
typeof problem.codes === "string"
? codeToBlock(problem.codes, prefixLineNum, suffixLineNum)
: "<CodeGroup>\n" +
Object.entries(problem.codes).map(([title, code]) => {
return `<CodeGroupItem title="${title}">
${typeof problem.codes === "string"
? codeToBlock(problem.codes, prefixLineNum, suffixLineNum)
: "<CodeGroup>\n" +
Object.entries(problem.codes).map(([title, code]) => {
return `<CodeGroupItem title="${title}">
${codeToBlock(code, prefixLineNum, suffixLineNum)}
</CodeGroupItem>`;
}) +
"\n</CodeGroup>"
}
}) +
"\n</CodeGroup>"
}
`,
})
);
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
"dev": "vuepress dev docs",
"build": "pnpm build:data && vuepress build docs"
},
"packageManager": "pnpm@7.27.1",
"packageManager": "pnpm@8",
"devDependencies": {
"@gytx/openjudge-api": "^0.1.3",
"@types/markdown-it": "^12.2.3",
"@vuepress/client": "2.0.0-beta.61",
"dotenv": "^16.0.3",
"dotenv": "^16.4.5",
"gray-matter": "^4.0.3",
"tsx": "^3.12.5",
"vue": "^3.2.47",
"tsx": "^3.14.0",
"vue": "^3.4.19",
"vuepress": "2.0.0-beta.61"
}
}
Loading

0 comments on commit 837db67

Please sign in to comment.