URIs - StoneyJackson/quilt GitHub Wiki

Quilt uses standard and non-standard URIs to identify and load content.

Non-standard URIs

Relative URIs with a scheme

file:../a/b.html

Scheme-relative URIs

This is a standard URI, but less well-known.

//site/a/b.html

CGI and CGIS schemes

The CGI and CGIS schemes are the same as HTTP and HTTPS schemes except they pass through request and response headers.

cgi:../a/b.html

Resolving relative URIs against a given base URI

Resolve a/b.html against http://site/path/file.html.

http://site/path/file.html::a/b.html

Resolve a/b.html against the URI in the variable pattern

$pattern::a/b.html

If a $ is needed in the URI, it must be percent-encoded.

Fragments

Fragment Identifiers

When a URI has a fragment identifier, only the element it identifies is returned.

CSS Fragment Identifiers

Check out Using CSS Selectors as Fragment Identifiers and CSSFrag Safari Extension. Quilt also provides a contents pseudo-element. It matches all the children of the matched node set, including text nodes. It has the same behavior as the contents() jQuery function.

a/b.html#css(.article::contents)