Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/snowpact/gatsby-plugin-external-css
Add external custom css files to your generated html pages
https://github.com/snowpact/gatsby-plugin-external-css
Last synced: about 2 months ago
JSON representation
Add external custom css files to your generated html pages
- Host: GitHub
- URL: https://github.com/snowpact/gatsby-plugin-external-css
- Owner: snowpact
- Created: 2021-06-10T17:08:38.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-07-16T11:24:07.000Z (over 3 years ago)
- Last Synced: 2024-11-09T01:18:57.043Z (2 months ago)
- Language: JavaScript
- Size: 228 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gatsby-plugin-external-css
Add external custom css files to your generated html pages.
## Installation
```bash
npm install gatsby-plugin-external-css
```or
```bash
yarn add gatsby-plugin-external-css
```## Usage
This plugin lets you add a custom css file in your builded public index.html.
You probably don't need this as it's for very specific usage.In my case, I'm generating different gatsby projects based on a config, and I'm providing a custom way to give a css file out of the src folder scope.
##### Add the following plugin to your `gatsby-config.js`
Create
```js
// gatsby-config.js
module.exports = {
plugins: [
{
resolve: 'gatsby-plugin-external-css',
options: {
source: 'full/local/path.css',
},
},
],
}
```
Be sure that the file exists.The file will be copied into the final public file with a custom cache busting.
The css file will be appended at the last of the meta.