diff --git a/docs/index.html b/docs/index.html index fdce9a3..4fcf53b 100644 --- a/docs/index.html +++ b/docs/index.html @@ -6,7 +6,7 @@ const savager = new Savager(symbols); const { assets, sheet } = savager.prepareAssets('balloon'); document.body.innerHTML = assets.balloon; -
When hosting assets externally, they should still be processed first by the create-symbols
script. The script will create a manifest which the Savager
instance uses to prepare assets.
import Savager from 'savager'; /* The constructor */
+
More information about the API can be found on github.
When hosting assets externally, they should still be processed first by the create-symbols
script. The script will create a manifest which the Savager
instance uses to prepare assets.
import Savager from 'savager'; /* The constructor */
import symbols from './manifest.js'; /* manifest.js, created from the `create-symbols` script */
The assets created should be the ones hosted externally. Savager will then construct the urls based on the externalPath
option provided. It's probably best to set this in the constructor options.
import Savager from 'savager';
import symbols from './manifest.js';
@@ -35,7 +35,7 @@
const savager = new Savager(symbols);
const { assets } = savager.prepareAssets(assetNames);
document.body.innerHTML = assets.balloon; // Now includes accessibility features
-
This also allows for an array of these objects. When providing a desc
, you must also provide a title
.
Depending on the method you choose, there may be reasons why the SVG doesn't render.
id
only exists within the root document that the element exists in; it cannot pentrate its search to a parent root document.Both of these can be resolved using the attemptInject
option, which will take the referenced asset shape and make a copy to be injected into the node. When preparing the assets, you will also receive a inject
function which should be executed on the page where the SVGs will appear.
import Savager from 'savager';
+
This also allows for an array of these objects. When providing a desc
, you must also provide a title
.
Depending on the method you choose, there may be reasons why the SVG doesn't render.
id
only exists within the root document that the element exists in; it cannot penatrate its search to a parent root document.Both of these can be resolved using the attemptInject
option, which will take the referenced asset shape and make a copy to be injected into the node. When preparing the assets, you will also receive a inject
function which should be executed on the page where the SVGs will appear.
import Savager from 'savager';
import symbols from './manifest.js';
const savager = new Savager(symbols, { attemptInject: true });