Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
# Conflicts:
#	package.json
#	pnpm-lock.yaml
  • Loading branch information
xsjcTony committed Dec 28, 2024
2 parents 822049a + b24895c commit 9cc8107
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 9 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<br>

<p align="center">
<img src="./docs/src/public/logo.svg" style="width:100px;" alt="logo" />
</p>

<h1 align="center">remark-magic-link</h1>

<p align="center">
🔌 A remark plugin to turn <code>{text}</code> syntax into links, optionally with an icon
</p>

<p align="center">
<a href="https://www.npmjs.com/package/remark-magic-link"><img src="https://img.shields.io/npm/v/remark-magic-link?color=ffc0cb" alt="NPM version"></a>
</p>

<br>

<p align="center">
<a href="https://remark-magic-link.aelita.me/">📚 Documentation</a>
</p>

<br>

## License

[MIT](https://github.com/xsjcTony/remark-magic-link/blob/main/LICENSE) License © 2024-present [Aelita (Tony Jiang)](https://aelita.me/)
3 changes: 3 additions & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,15 @@ export default defineConfig({
optimizeDeps: {
exclude: [
'@nolebase/vitepress-plugin-enhanced-readabilities/client',
'vitepress',
'@nolebase/ui',
],
},
ssr: {
noExternal: [
'@nolebase/vitepress-plugin-enhanced-readabilities',
'@nolebase/vitepress-plugin-highlight-targeted-heading',
'@nolebase/ui',
],
},
css: {
Expand Down
2 changes: 1 addition & 1 deletion docs/src/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ interface RemarkMagicLinkOptions {

- Type: `Record<string, string | { link: string; icon?: string | false }>`

An object of key-value pairs where the keys are the texts to be matched and the values are the links and icons to be used.
An object of key-value pairs where keys are the texts to be matched and values are the links and icons to be used.

::: warning
This is required if you are using the default [handlers](/api/handler), otherwise nothing will be done.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ If you want to customize it yourself, the plugin generates a well-structured HTM
## Options
The only required option is [`linksMap`](/api/#linksMap) if you are using the default [handlers](/api/handler), which is an object where the keys are the texts to be matched and the values are the links and icons to be used.
The only required option is [`linksMap`](/api/#linksMap) if you are using the default [handlers](/api/handler), which is an object where keys are the texts to be matched and values are the links and icons to be used.
Refer to [API Reference](/api/) for advanced usages.
Expand Down
1 change: 1 addition & 0 deletions eslintConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { defineConfig } from '@aelita-dev/eslint-config'

export default defineConfig(
{
ignores: ['README.md'],
typescript: {
projectType: 'lib',
},
Expand Down
11 changes: 4 additions & 7 deletions vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import { fileURLToPath } from 'node:url'
import tsconfigPaths from 'vite-tsconfig-paths'
import { defaultExclude, defineConfig } from 'vitest/config'


export default defineConfig({
resolve: {
alias: {
'@': fileURLToPath(new URL('src', import.meta.url)),
'~': fileURLToPath(new URL('test', import.meta.url)),
},
},
plugins: [
tsconfigPaths(),
],
test: {
coverage: {
provider: 'v8',
Expand Down

0 comments on commit 9cc8107

Please sign in to comment.