From 008a094e95b79e136c321d50c89f8230744d5a64 Mon Sep 17 00:00:00 2001
From: Mikael Konutgan
Date: Thu, 23 May 2013 20:07:25 +0200
Subject: [PATCH 1/2] Document Jekyll's date_to_rfc822 and uri_escape filters
on the site
---
site/docs/templates.md | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/site/docs/templates.md b/site/docs/templates.md
index 08929eeea..6402970d8 100644
--- a/site/docs/templates.md
+++ b/site/docs/templates.md
@@ -37,6 +37,20 @@ common tasks easier.
+
+ |
+ Date to RFC-822 Format
+ Convert a Date into the RFC-822 format used for RSS feeds.
+ |
+
+
+ {% raw %}{{ site.time | date_to_rfc822 }}{% endraw %}
+
+
+ Mon, 17 Nov 2008 13:07:54 -0800
+
+ |
+
|
Date to String
@@ -93,6 +107,22 @@ common tasks easier.
|
+
+ |
+ URI Escape
+
+ URI escape a string.
+
+ |
+
+
+ {% raw %}{{ “'foo, bar \\baz?'” | uri_escape }}{% endraw %}
+
+
+ foo,%20bar%20%5Cbaz?
+
+ |
+
|
Number of Words
From 9adfd6ddeb900e2b93dca0aa0620f64beeb3e55d Mon Sep 17 00:00:00 2001
From: Mikael Konutgan
Date: Thu, 23 May 2013 20:18:08 +0200
Subject: [PATCH 2/2] Document uri_escape
---
lib/jekyll/filters.rb | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/lib/jekyll/filters.rb b/lib/jekyll/filters.rb
index ef720f78e..45c123b48 100644
--- a/lib/jekyll/filters.rb
+++ b/lib/jekyll/filters.rb
@@ -99,7 +99,17 @@ module Jekyll
def cgi_escape(input)
CGI::escape(input)
end
-
+
+ # URI escape a string.
+ #
+ # input - The String to escape.
+ #
+ # Examples
+ #
+ # uri_escape('foo, bar \\baz?')
+ # # => "foo,%20bar%20%5Cbaz?"
+ #
+ # Returns the escaped String.
def uri_escape(input)
URI.escape(input)
end
|