lib/nox/ghserver.rb in nox-0.1.0 vs lib/nox/ghserver.rb in nox-0.1.1
- old
+ new
@@ -26,10 +26,11 @@
styles << %{<link crossorigin="anonymous" href="/style.css" media="all" rel="stylesheet"> }
styles << %{ <style> body { padding: 25px 25px 25px 25px; } </style> }
render = @pipeline.call File.read(@filename)
rsp.body = <<-BODY
<html>
+ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<head>#{styles.join('')}</head>
<body>
<article class="markdown-body">
#{render[:output]}
</article>
@@ -47,10 +48,10 @@
class Styles < WEBrick::HTTPServlet::AbstractServlet
def do_GET req, rsp
begin
rsp.status = 200
rsp['Content-Type'] = 'text/css'
- rsp.body = ['normalize', 'github'].map do |style|
+ rsp.body = ['normalize', 'github', 'override'].map do |style|
File.read(File.absolute_path("../../#{style}.css", File.dirname(__FILE__)))
end.join("\n")
end
end
end