https://github.com/hunghg255/rspress-plugin-mention-github
Rspress plugin mention
https://github.com/hunghg255/rspress-plugin-mention-github
rspress rspress-plugin
Last synced: 5 months ago
JSON representation
Rspress plugin mention
- Host: GitHub
- URL: https://github.com/hunghg255/rspress-plugin-mention-github
- Owner: hunghg255
- License: mit
- Created: 2024-06-07T10:12:34.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-06-08T02:07:54.000Z (10 months ago)
- Last Synced: 2024-11-11T20:35:18.566Z (5 months ago)
- Topics: rspress, rspress-plugin
- Language: TypeScript
- Homepage: https://rspress-plugin-mention-github.vercel.app
- Size: 214 KB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-rspack - rspress-plugin-mention-github
README
# Rspress Plugin Mention Github

## Install
```bash
npm i rspress-plugin-mention-github -D
```## Config
- Import css
```css
@import url('rspress-plugin-mention-github/style.css');
```- Add plugin to `rspress.config.ts`
```js
import * as path from 'path';
import { defineConfig } from 'rspress/config';import rspressPlugMentionGithub from 'rspress-plugin-mention-github';
export default defineConfig({
plugins: [
rspressPlugMentionGithub()],
});```
## Write markdown
- Mention github user
```js
{@web-infra-dev}
```- or pass option link map
```js
{Web Infra Dev}
``````js
import * as path from 'path';
import { defineConfig } from 'rspress/config';import rspressPlugMentionGithub from 'rspress-plugin-mention-github';
export default defineConfig({
plugins: [
rspressPlugMentionGithub({
'Web Infra Dev': 'https://github.com/web-infra-dev',
'Rspack': {
link: 'https://github.com/web-infra-dev/rspack',
imageUrl: 'https://assets.rspack.dev/rspack/rspack-logo.svg'
},
})],
});```