File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,10 +11,10 @@ <h1 class="entry-title">{{ page.title | titlecase }}</h1>
1111 </ header >
1212{% endunless %}
1313{% if index %}
14- < div class ="entry-content "> {{ content | exerpt | smart_quotes }}</ div >
14+ < div class ="entry-content "> {{ content | full_urls: site.root | exerpt | smart_quotes }}</ div >
1515 < footer >
1616 < a rel ="full-article " href ="{{ site.root }}{{ post.url }} "> Read on →</ a >
1717 </ footer >
1818{% else %}
19- < div class ="entry-content "> {{ content | smart_quotes }}</ div >
19+ < div class ="entry-content "> {{ content | full_urls: site.root | smart_quotes }}</ div >
2020{% endif %}
Original file line number Diff line number Diff line change 88 < h1 class ="entry-title "> {{ page.title | titlecase }}</ h1 >
99 {% if page.date %}< p class ="meta "> {% include post/date.html %}</ p > {% endif %}
1010 </ header >
11- {{ content | smart_quotes }}
11+ {{ content | full_urls: site.root | smart_quotes }}
1212 {% unless page.footer == false %}
1313 < footer >
1414 {% if page.date %}< p class ="meta "> {% include post/date.html %}</ p > {% endif %}
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ def summary(input)
2121
2222 # Replaces relative urls with full urls
2323 def full_urls ( input , url = '' )
24+ url ||= ''
2425 input . gsub /(\s +(href|src)\s *=\s *["|']{1})(\/ [^\" '>]+)/ do
2526 $1+url +$3
2627 end
Original file line number Diff line number Diff line change 55#
66# Syntax {% include_code path/to/file %}
77#
8- # Example:
8+ # Example 1 :
99# {% include_code javascripts/test.js %}
1010#
1111# This will import test.js from source/downloads/code/javascripts/test.js
1212# and output the contents in a syntax highlighted code block inside a figure,
1313# with a figcaption listing the file name and download link
1414#
15+ # Example 2:
16+ # You can also include an optional title for the <figcaption>
17+ #
18+ # {% include_code Example 2 javascripts/test.js %}
19+ #
20+ # will output a figcaption with the title: Example 2 (test.js)
21+ #
1522
1623require 'pathname'
1724
You can’t perform that action at this time.
0 commit comments