├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── commit-convention.md ├── contributing.md └── workflows │ └── test.yml ├── .gitignore ├── .prettierrc ├── .vscode └── settings.json ├── CHANGELOG.md ├── LICENSE ├── README.md ├── __tests__ ├── client │ └── theme-default │ │ ├── support │ │ └── sideBar.spec.ts │ │ └── utils.spec.ts └── node │ └── utils │ ├── deeplyParseHeader.spec.ts │ ├── parseHeader.spec.ts │ └── removeNonCodeWrappedHTML.spec.ts ├── bin ├── vitepress-fc.js └── vitepress.js ├── demo.png ├── docs ├── .vitepress │ ├── config.js │ └── theme │ │ └── index.js ├── demo-example.vue ├── guide │ ├── config.md │ ├── getting-started.md │ ├── mapping.md │ └── write-demo.md ├── index.md ├── package.json └── public │ └── _headers ├── example.png ├── examples └── minimal │ ├── index.md │ └── package.json ├── jest.config.js ├── package-lock.json ├── package.json ├── scripts ├── copyClient.js ├── copyShared.js ├── release.js └── watchAndCopy.js ├── src ├── client │ ├── app │ │ ├── components │ │ │ ├── ClientOnly.ts │ │ │ ├── Content.ts │ │ │ ├── Debug.vue │ │ │ └── Demo │ │ │ │ ├── OnlineEdit │ │ │ │ ├── OnlineEdit.vue │ │ │ │ ├── constants.ts │ │ │ │ ├── icons │ │ │ │ │ ├── CodeSandboxIcon.vue │ │ │ │ │ ├── CodepenIcon.vue │ │ │ │ │ └── JsfiddleIcon.vue │ │ │ │ ├── index.ts │ │ │ │ ├── onlineEdit.css │ │ │ │ └── utils.ts │ │ │ │ ├── demo.css │ │ │ │ ├── demo.vue │ │ │ │ ├── icons │ │ │ │ ├── code.vue │ │ │ │ └── copy.vue │ │ │ │ ├── index.ts │ │ │ │ ├── useCopyCode.ts │ │ │ │ └── useParseCode.ts │ │ ├── composables │ │ │ ├── frontmatter.ts │ │ │ ├── head.ts │ │ │ ├── pageData.ts │ │ │ ├── preFetch.ts │ │ │ ├── siteData.ts │ │ │ └── siteDataByRoute.ts │ │ ├── index.ts │ │ ├── mixin.ts │ │ ├── router.ts │ │ ├── theme.ts │ │ └── utils.ts │ ├── index.ts │ ├── shared │ │ └── config.ts │ ├── shim.d.ts │ ├── theme-default │ │ ├── Layout.vue │ │ ├── NotFound.vue │ │ ├── components │ │ │ ├── AlgoliaSearchBox.vue │ │ │ ├── BuySellAds.vue │ │ │ ├── CarbonAds.vue │ │ │ ├── EditLink.vue │ │ │ ├── Home.vue │ │ │ ├── HomeFeatures.vue │ │ │ ├── HomeFooter.vue │ │ │ ├── HomeHero.vue │ │ │ ├── LastUpdated.vue │ │ │ ├── NavBar.vue │ │ │ ├── NavBarTitle.vue │ │ │ ├── NavDropdownLink.vue │ │ │ ├── NavDropdownLinkItem.vue │ │ │ ├── NavLink.vue │ │ │ ├── NavLinks.vue │ │ │ ├── NextAndPrevLinks.vue │ │ │ ├── Page.vue │ │ │ ├── PageFooter.vue │ │ │ ├── SideBar.vue │ │ │ ├── SideBarLink.ts │ │ │ ├── SideBarLinks.vue │ │ │ ├── Slugs.vue │ │ │ ├── ToggleSideBarButton.vue │ │ │ └── icons │ │ │ │ ├── ArrowLeft.vue │ │ │ │ ├── ArrowRight.vue │ │ │ │ └── OutboundLink.vue │ │ ├── composables │ │ │ ├── activeSidebarLink.ts │ │ │ ├── editLink.ts │ │ │ ├── nav.ts │ │ │ ├── navLink.ts │ │ │ ├── nextAndPrevLinks.ts │ │ │ ├── repo.ts │ │ │ ├── sideBar.ts │ │ │ └── url.ts │ │ ├── config.ts │ │ ├── index.ts │ │ ├── styles │ │ │ ├── code.css │ │ │ ├── custom-blocks.css │ │ │ ├── layout.css │ │ │ ├── markdown.css │ │ │ ├── reset.css │ │ │ ├── sidebar-links.css │ │ │ └── vars.css │ │ ├── support │ │ │ └── sideBar.ts │ │ └── utils.ts │ └── tsconfig.json ├── node │ ├── alias.ts │ ├── build │ │ ├── build.ts │ │ ├── bundle.ts │ │ └── render.ts │ ├── cli.ts │ ├── config.ts │ ├── index.ts │ ├── markdown │ │ ├── markdown.ts │ │ └── plugins │ │ │ ├── component.ts │ │ │ ├── containers.ts │ │ │ ├── demo.ts │ │ │ ├── header.ts │ │ │ ├── highlight.ts │ │ │ ├── highlightLines.ts │ │ │ ├── hoist.ts │ │ │ ├── lineNumbers.ts │ │ │ ├── link.ts │ │ │ ├── preWrapper.ts │ │ │ ├── slugify.ts │ │ │ └── snippet.ts │ ├── markdownToVue.ts │ ├── plugin.ts │ ├── serve │ │ └── serve.ts │ ├── server.ts │ ├── temporary │ │ ├── copy.ts │ │ └── genTemp.ts │ ├── tsconfig.json │ └── utils │ │ ├── parseHeader.ts │ │ └── slash.ts └── shared │ ├── config.ts │ └── tsconfig.json ├── theme.d.ts ├── tsconfig.json ├── types ├── index.d.ts └── shared.d.ts └── yarn.lock /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: 'bug: pending triage' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 15 | 16 | **Describe the bug** 17 | A clear and concise description of what the bug is. 18 | 19 | **To Reproduce** 20 | Steps to reproduce the behavior: 21 | 22 | **Expected behavior** 23 | A clear and concise description of what you expected to happen. 24 | 25 | **System Info** 26 | - vitepress version: 27 | - vite version: 28 | - Node version: 29 | - OS version: 30 | 31 | **Additional context** 32 | Add any other context about the problem here. 33 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/commit-convention.md: -------------------------------------------------------------------------------- 1 | ## Git Commit Message Convention 2 | 3 | > This is adapted from [Angular's commit convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular). 4 | 5 | #### TL;DR: 6 | 7 | Messages must be matched by the following regex: 8 | 9 | ``` js 10 | /^(revert: )?(feat|fix|docs|dx|style|refactor|perf|test|workflow|build|ci|chore|types|wip)(\(.+\))?: .{1,50}/ 11 | ``` 12 | 13 | #### Examples 14 | 15 | Appears under "Features" header, `theme` subheader: 16 | 17 | ``` 18 | feat(theme): add home page feature 19 | ``` 20 | 21 | Appears under "Bug Fixes" header, `theme` subheader, with a link to issue #28: 22 | 23 | ``` 24 | fix(theme): remove underline on sidebar hover style 25 | 26 | close #28 27 | ``` 28 | 29 | Appears under "Performance Improvements" header, and under "Breaking Changes" with the breaking change explanation: 30 | 31 | ``` 32 | perf: improve store getters performance by removing 'foo' option 33 | 34 | BREAKING CHANGE: The 'foo' option has been removed. 35 | ``` 36 | 37 | The following commit and commit `667ecc1` do not appear in the changelog if they are under the same release. If not, the revert commit appears under the "Reverts" header. 38 | 39 | ``` 40 | revert: feat(theme): add home page feature 41 | 42 | This reverts commit 667ecc1654a317a13331b17617d973392f415f02. 43 | ``` 44 | 45 | ### Full Message Format 46 | 47 | A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**: 48 | 49 | ``` 50 | (): 51 | 52 | 53 | 54 |