Skip to content

Latest commit

 

History

History
71 lines (45 loc) · 1.84 KB

README.md

File metadata and controls

71 lines (45 loc) · 1.84 KB

Rspress Plugin Mention Github

Install

npm i rspress-plugin-mention-github -D

Config

  • Import css
@import url('rspress-plugin-mention-github/style.css');
  • Add plugin to rspress.config.ts
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
{@web-infra-dev}
  • or pass option link map
{Web Infra Dev}
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'
      },
    })],
});