Use from Source
Work in Progress
This guide is not yet complete but should get you started.
You can easily add the source file to your project for full control over the template.
Contributors Component
Download or copy the Contributors.vue file to your project.
- Source File: Contributors.vue
- Target Location:
.vitepress/theme/components/Contributors.vue
Add these 2 lines to your index.[js,ts]
.
import DefaultTheme from 'vitepress/theme'
import Contributors from './components/Contributors.vue'
export default {
...DefaultTheme,
enhanceApp({ app }) {
app.component('Contributors', Contributors)
},
}
See the Contributors Documentation for <Contributors>
tag usage and examples.
Get Contributors Script
This can be installed with npm, or you can manually copy it to your project.
- Source: src/get-contributors
- Latest Release: get-contributors.js
The Latest Release is a built, dependency free, version that can be run directly with node.
To use the Source directly you need to install the dependency, commander.js.
npm i commander
pnpm i commander
yarn add commander
bun i commander
See the Get Contributors Documentation for details on the get-contributors
script.
Building
To build get-contributors.js
without dependencies you can use @vercel/ncc.
npm i -g @vercel/ncc
pnpm i -g @vercel/ncc
yarn add -g @vercel/ncc
bun i -g @vercel/ncc
Then you can build it like this.
ncc build src/get-contributors.js -o dist/get-contributors
ncc build -m src/get-contributors.js -o dist/get-contributors
The resulting dist/get-contributors/index.js
can then be run without any dependencies.