Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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-bookmark

https://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)