From 8f7d952a300fc8d055b7776e354a2eaa5bb69f53 Mon Sep 17 00:00:00 2001 From: Christopher Cliff Date: Mon, 13 Feb 2012 18:28:37 -0500 Subject: [PATCH 1/3] Updated docs for hogan templates and data uris. --- .../Views/Documentation/Stylesheets_DataUris.cshtml | 11 ++++++----- src/Website/Views/Documentation/_Documentation.cshtml | 1 + src/Website/Website.csproj | 3 +++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/Website/Views/Documentation/Stylesheets_DataUris.cshtml b/src/Website/Views/Documentation/Stylesheets_DataUris.cshtml index 49344359..f772f155 100644 --- a/src/Website/Views/Documentation/Stylesheets_DataUris.cshtml +++ b/src/Website/Views/Documentation/Stylesheets_DataUris.cshtml @@ -4,11 +4,12 @@

Data URIs

Warning: This feature is still experimental!

-

Cassette can convert CSS images into data-URIs. Enable this feature with the following configuration.

+

Cassette can convert CSS images (under 32kB) and fonts (TTF or OTF) into data-URIs. Enable this feature with the following configuration.

bundles.Add<StylesheetBundle>(
     "styles",
     b => b.Processor = new StylesheetPipeline
-    {
-        ConvertImageUrlsToDataUris = true
-    }
-);
\ No newline at end of file + .EmbedImages(path => path.Contains("/embed/")) + .EmbedFonts(path => path.Contains("/embed/")) +); +

EmbedImages and EmbedFonts both accept an optional expression to tell Cassette which file paths to include. By default, Cassette +will attempt to embed all images and fonts.

\ No newline at end of file diff --git a/src/Website/Views/Documentation/_Documentation.cshtml b/src/Website/Views/Documentation/_Documentation.cshtml index e6c84dd0..d3ed1d02 100644 --- a/src/Website/Views/Documentation/_Documentation.cshtml +++ b/src/Website/Views/Documentation/_Documentation.cshtml @@ -64,6 +64,7 @@ diff --git a/src/Website/Website.csproj b/src/Website/Website.csproj index 36ea8a35..9a70c569 100644 --- a/src/Website/Website.csproj +++ b/src/Website/Website.csproj @@ -248,6 +248,9 @@ + + +