Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mattjennings/mdsvex-relative-images
Add support for relative image URLs in mdsvex
https://github.com/mattjennings/mdsvex-relative-images
Last synced: about 8 hours ago
JSON representation
Add support for relative image URLs in mdsvex
- Host: GitHub
- URL: https://github.com/mattjennings/mdsvex-relative-images
- Owner: mattjennings
- Created: 2021-07-10T20:46:49.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-26T21:20:58.000Z (about 2 years ago)
- Last Synced: 2024-03-15T07:24:08.147Z (8 months ago)
- Language: JavaScript
- Size: 28.3 KB
- Stars: 22
- Watchers: 3
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mdsvex-relative-images
Allows you to use relative urls to images from the md file.
# Usage
```
npm install mdsvex-relative-images
```Add the plugin to your mdsvex config
```js
// mdsvex.config.js
import relativeImages from "mdsvex-relative-images";export default {
// ... rest of your config
remarkPlugins: [relativeImages],
};
```Now you can load images like so:
```md
![my image](./my-image.png)
```It also works for img and video tags:
```svelte
```