Created
June 7, 2011 17:57
-
-
Save rgantt/1012755 to your computer and use it in GitHub Desktop.
Compiling and routing examples - nanoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run index.html through erb | |
compile '/' do | |
filter :erb | |
layout 'page' | |
end | |
# run the articles through textile | |
compile '/articles/*' do | |
filter :redcloth | |
layout 'article' | |
end | |
# route all of the pages according to their path | |
route '*' do | |
item.identifier + 'index.html' | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
compile '/images/*/' do | |
# don't filter or layout | |
end | |
route '/images/*' do | |
item.identifier.chop + '.' + item[:extension] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment