https://github.com/cofob/postcss-ipfs
https://github.com/cofob/postcss-ipfs
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/cofob/postcss-ipfs
- Owner: cofob
- License: mit
- Created: 2022-11-22T11:40:58.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-13T18:15:18.000Z (7 months ago)
- Last Synced: 2025-05-06T15:28:33.423Z (2 months ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PostCSS IPFS [
][PostCSS]
[PostCSS] plugin for replacing IPFS strings.
**Write this:**
```css
.foo {
background-image: url(ipfs://Qmhash/path/to/file.png);
}.bar {
background-image: url(ipns://some.ipns.link/path/to/file.png);
}
```**And get this:**
```css
.foo {
background-image: url(https://ipfs.io/ipfs/Qmhash/path/to/file.png);
}.bar {
background-image: url(https://ipfs.io/ipns/some.ipns.link/path/to/file.png);
}
```## Installation
`$ npm install postcss-ipfs`
## Usage
```JS
postcss([ require('postcss-ipfs') ])
```See [PostCSS](https://github.com/postcss/postcss) docs for [examples regarding usage](https://github.com/postcss/postcss#usage).
## Options
### `gateway`
- Type: `string`
- Default: `https://ipfs.io/`Gateway that will replace `ipfs://` links.
[PostCSS]: https://github.com/postcss/postcss