-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
3,110 additions
and
2,562 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,8 @@ coverage | |
dist | ||
.temp | ||
.cache | ||
cache | ||
|
||
.DS_Store | ||
.history | ||
.vscode | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { defineConfig } from 'vitepress' | ||
import { nav, sidebar } from '../config' | ||
console.log('🤔 ~ file: config.ts:3 ~ nav:', nav) | ||
|
||
// https://vitepress.dev/reference/site-config | ||
export default defineConfig({ | ||
title: 'Fuxk-leetcode', | ||
description: '手撕 Leetcode 算法题', | ||
themeConfig: { | ||
// https://vitepress.dev/reference/default-theme-config | ||
nav, | ||
|
||
sidebar, | ||
|
||
socialLinks: [ | ||
{ icon: 'github', link: 'https://github.com/vuejs/vitepress' }, | ||
], | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
# fuxk-leetcode | ||
|
||
手撕 leetcode(小声) | ||
|
||
run | ||
|
||
```bash | ||
yarn install | ||
pnpm install | ||
|
||
yarn dev | ||
pnpm run dev | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
outline: deep | ||
--- | ||
|
||
# Runtime API Examples | ||
|
||
This page demonstrates usage of some of the runtime APIs provided by VitePress. | ||
|
||
The main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files: | ||
|
||
```md | ||
<script setup> | ||
import { useData } from 'vitepress' | ||
|
||
const { theme, page, frontmatter } = useData() | ||
</script> | ||
|
||
## Results | ||
|
||
### Theme Data | ||
<pre>{{ theme }}</pre> | ||
|
||
### Page Data | ||
<pre>{{ page }}</pre> | ||
|
||
### Page Frontmatter | ||
<pre>{{ frontmatter }}</pre> | ||
``` | ||
|
||
<script setup> | ||
import { useData } from 'vitepress' | ||
|
||
const { site, theme, page, frontmatter } = useData() | ||
</script> | ||
|
||
## Results | ||
|
||
### Theme Data | ||
<pre>{{ theme }}</pre> | ||
|
||
### Page Data | ||
<pre>{{ page }}</pre> | ||
|
||
### Page Frontmatter | ||
<pre>{{ frontmatter }}</pre> | ||
|
||
## More | ||
|
||
Check out the documentation for the [full list of runtime APIs](https://vitepress.dev/reference/runtime-api#usedata). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export * as navbar from './navbar' | ||
export * as sidebar from './sidebar' | ||
export * from './nav' | ||
export * from './sidebar' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,18 @@ | ||
export * from './zh' | ||
import type { DefaultTheme } from 'vitepress' | ||
import { getDocsFiles } from '../../utils' | ||
|
||
export const sidebar: DefaultTheme.Sidebar = { | ||
'/structure/': [ | ||
{ | ||
text: '数据结构', | ||
collapsed: true, | ||
items: getDocsFiles('structure'), | ||
}, | ||
], | ||
'/basic/': [ | ||
{ | ||
text: '算法题', | ||
items: getDocsFiles('basic'), | ||
}, | ||
], | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
# https://vitepress.dev/reference/default-theme-home-page | ||
layout: home | ||
|
||
hero: | ||
name: 'Fuxk-leetcode' | ||
text: '手撕 Leetcode 算法题' | ||
# tagline: My great project tagline | ||
image: | ||
src: /resource/images/logo.png | ||
alt: Fuxk-leetcode | ||
actions: | ||
- theme: brand | ||
text: Markdown Examples | ||
link: /markdown-examples | ||
- theme: alt | ||
text: API Examples | ||
link: /api-examples | ||
|
||
features: | ||
- title: Feature A | ||
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit | ||
- title: Feature B | ||
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit | ||
- title: Feature C | ||
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# Markdown Extension Examples | ||
|
||
This page demonstrates some of the built-in markdown extensions provided by VitePress. | ||
|
||
## Syntax Highlighting | ||
|
||
VitePress provides Syntax Highlighting powered by [Shikiji](https://github.com/antfu/shikiji), with additional features like line-highlighting: | ||
|
||
**Input** | ||
|
||
````md | ||
```js{4} | ||
export default { | ||
data () { | ||
return { | ||
msg: 'Highlighted!' | ||
} | ||
} | ||
} | ||
``` | ||
```` | ||
|
||
**Output** | ||
|
||
```js{4} | ||
export default { | ||
data () { | ||
return { | ||
msg: 'Highlighted!' | ||
} | ||
} | ||
} | ||
``` | ||
|
||
## Custom Containers | ||
|
||
**Input** | ||
|
||
```md | ||
::: info | ||
This is an info box. | ||
::: | ||
|
||
::: tip | ||
This is a tip. | ||
::: | ||
|
||
::: warning | ||
This is a warning. | ||
::: | ||
|
||
::: danger | ||
This is a dangerous warning. | ||
::: | ||
|
||
::: details | ||
This is a details block. | ||
::: | ||
``` | ||
|
||
**Output** | ||
|
||
::: info | ||
This is an info box. | ||
::: | ||
|
||
::: tip | ||
This is a tip. | ||
::: | ||
|
||
::: warning | ||
This is a warning. | ||
::: | ||
|
||
::: danger | ||
This is a dangerous warning. | ||
::: | ||
|
||
::: details | ||
This is a details block. | ||
::: | ||
|
||
## More | ||
|
||
Check out the documentation for the [full list of markdown extensions](https://vitepress.dev/guide/markdown). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,31 @@ | ||
{ | ||
"name": "fuxk-leetcode", | ||
"type": "module", | ||
"version": "0.0.1", | ||
"repository": "git@github.com:liwuhou/fuxk-leetcode.git", | ||
"author": "阿五 <hugewilliam@foxmail.com>", | ||
"license": "MIT", | ||
"scripts": { | ||
"preinstall": "npx pm-keeper pnpm", | ||
"test": "jest ./code", | ||
"dev": "vuepress dev docs --config vuepress.config.ts", | ||
"build": "vuepress build docs --config vuepress.config.ts" | ||
"start": "vuepress dev docs --config vuepress.config.ts", | ||
"build": "vuepress build docs --config vuepress.config.ts", | ||
"docs:dev": "vitepress dev", | ||
"docs:build": "vitepress build", | ||
"docs:preview": "vitepress preview" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.16.12", | ||
"@babel/preset-env": "^7.16.11", | ||
"@babel/preset-typescript": "^7.16.7", | ||
"@types/jest": "^27.4.0", | ||
"@vuepress/bundler-vite": "^2.0.0-beta.35", | ||
"babel-jest": "^27.4.6", | ||
"jest": "^27.4.7", | ||
"ts-node": "^10.4.0", | ||
"typescript": "^4.5.5", | ||
"vuepress": "^2.0.0-beta.35" | ||
"@babel/core": "^7.23.5", | ||
"@babel/preset-env": "^7.23.5", | ||
"@babel/preset-typescript": "^7.23.3", | ||
"@types/jest": "^27.5.2", | ||
"@vuepress/bundler-vite": "2.0.0-rc.0", | ||
"@vuepress/cli": "2.0.0-rc.0", | ||
"babel-jest": "^27.5.1", | ||
"jest": "^27.5.1", | ||
"ts-node": "^10.9.2", | ||
"typescript": "^4.9.5", | ||
"vitepress": "1.0.0-rc.31", | ||
"vuepress": "2.0.0-rc.0" | ||
} | ||
} | ||
} |
Oops, something went wrong.