diff options
author | Paul Duncan <pabs@pablotron.org> | 2016-03-05 19:50:08 -0500 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2016-03-05 19:50:08 -0500 |
commit | 2feff82cf98724bb1f8249d681f116459241c929 (patch) | |
tree | 5c0627cc599cdb888fb741d08a27f6b698d1d51b /src/guff.cr | |
parent | 95e31f6daffb634690ad910a621ba907987ab9c9 (diff) | |
download | old-guff-2feff82cf98724bb1f8249d681f116459241c929.tar.bz2 old-guff-2feff82cf98724bb1f8249d681f116459241c929.zip |
add htmlpageview and views/page.cr
Diffstat (limited to 'src/guff.cr')
-rw-r--r-- | src/guff.cr | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/guff.cr b/src/guff.cr index 174ec67..b2794b6 100644 --- a/src/guff.cr +++ b/src/guff.cr @@ -13,10 +13,13 @@ module Guff def call(context : HTTP::Server::Context) if md = RE.match(context.request.path || "") - context.response.puts "SlugHandler: path = %s, md = %s" % [ + title = "SlugHandler: path = %s, md = %s" % [ context.request.path, md.to_s ] + + context.response.content_type = "text/html; charset=utf-8" + context.response.puts HTMLPageView.new(title, "asdf") else call_next(context) end |