File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -148,7 +148,25 @@ Whether to remove the original `<link rel="stylesheet">` tags after (possibly) i
148148Type: ` String `
149149Default: ` filePath `
150150
151- How to resolve hrefs.
151+ How to resolve hrefs. Must be a string of one character or more. ** Required** .
152+
153+ Relative urls in links will have this value prepended to them. So these links:
154+ * ` <a href="page-relative">Page</a> `
155+ * ` <a href="/root-relative">Root</a> ` <- _ note leading /_
156+
157+
158+ With this option:
159+ ``` js
160+ inlineCss (html, { url: ' http://example.com/mushroom' })
161+ .then (function (html ) { console .log (html); });
162+ ```
163+
164+ Will result in
165+
166+ * ` <a href="http://example.com/mushroom/page-relative">Page</a> `
167+ * ` <a href="http://example.com/root-relative">Root</a> `
168+
169+ If you don't need this feature, simply set the property to a short string eg ` {url: ' '} ` (one space) and everything will work.
152170
153171#### options.preserveMediaQueries
154172
You can’t perform that action at this time.
0 commit comments