Inject inline svg from .svg files using gulp-inject.
HTML JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
dest
gulp
src
.gitignore
README.md
gulpfile.js
package.json

README.md

inject-inline-svg

auto-embed inline svg from .svg files using gulp-inject.

Usage

Write the following comment in src HTML files:

<!-- (path-to-file)/(filename-without-extension):svg --><!-- endinject -->

Example

When you inject /asset/img/circle.svg into the src HTML file:

<!-- asset/img/circle:svg --><!-- endinject -->

Output:

<!-- asset/img/circle:svg --><svg>...</svg><!-- endinject -->

Reference