Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sota1235/remark-link-bookmark
Remark plugin to change link URL to bookmark component like notion.
https://github.com/sota1235/remark-link-bookmark
Last synced: about 2 months ago
JSON representation
Remark plugin to change link URL to bookmark component like notion.
- Host: GitHub
- URL: https://github.com/sota1235/remark-link-bookmark
- Owner: sota1235
- License: mit
- Created: 2024-11-07T08:22:42.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-16T07:58:43.000Z (about 2 months ago)
- Last Synced: 2024-11-16T08:28:59.393Z (about 2 months ago)
- Language: TypeScript
- Size: 272 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
@sota1235/remark-link-bookmark
====Remark plugin to convert link to bookmark component.
### Usage
```shell
npm i -E @sota1235/remark-link-bookmark
```Then use like this.
```javascript
import { remark } from 'remark';
import { remarkLinkBookmark } from './dist/index.js';const exampleMarkdown = `
# remark-link-bookmarkhttps://example.com/
`;const result = await remark()
.use(remarkLinkBookmark, {})
.process(exampleMarkdown);console.log(result.toString());
```You will get the following output.
```markdown
# remark-link-bookmark
```#### Options
```typescript
export type Options = {
// class prefix for all each element
classPrefix?: string;
// class names for each element
// for example, if you want to add extra class names for some compoentns, you can use this option.
mergeClassNames?: {
container?: string;
content?: string;
info?: string;
title?: string;
titleLink?: string;
description?: string;
image?: string;
footer?: string;
footerLink?: string;
favicon?: string;
};
// cache options
cache?: {
// cache directory path
cacheFilePath?: string;
// cache file name
cacheFileName?: string;
};
};
```### Licence
This software is released under the MIT License, see LICENSE.txt.
## Author
[@sota1235](https://github.com/sota1235)