Class | Nanoc3::Filters::RelativizePaths |
In: |
lib/nanoc3/filters/relativize_paths.rb
|
Parent: | Nanoc3::Filter |
Relativizes all paths in the given content, which can be either HTML or CSS. This filter is quite useful if a site needs to be hosted in a subdirectory instead of a subdomain. In HTML, all `href` and `src` attributes will be relativized. In CSS, all `url()` references will be relativized.
@param [String] content The content to filter
@option params [Symbol] :type The type of content to filter; can be either `:html` or `:css`.
@return [String] The filtered content