lib/noumenon/core.rb in noumenon-0.1.3 vs lib/noumenon/core.rb in noumenon-0.1.4

- old
+ new

@@ -38,10 +38,17 @@ # @api public # @return [ Noumenon::Repository ] the current content repository def content Noumenon.content_repository end - + + get "/assets/*" do |path| + asset = Noumenon.asset_repository.get_asset("/#{path}") + halt 404, "Asset not found" unless asset + + asset + end + get "*" do |path| page = content.get(path) unless page # Search up the tree until we either hit the top, and 404, or find a mounted application.