-
-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow request md files with or without the .md extension #66
Changes from 1 commit
1848ba5
1764d80
beee209
2a37914
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
module Madness | ||
|
||
# The Madness::Static middleware delegates requests to Rack::TryStatic middleware | ||
# trying to match a static file when the request doesn't finish with ".md" | ||
|
||
class Static | ||
|
||
def initialize(app, options) | ||
@app = app | ||
@static = ::Rack::TryStatic.new(app, options) | ||
end | ||
|
||
def call(env) | ||
orig_path = env['PATH_INFO'] | ||
if orig_path.end_with? ".md" | ||
@app.call(env) | ||
else | ||
@static.call(env) | ||
end | ||
end | ||
end | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
tmp/theme-test: | ||
public | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why the change in this file? Seems to also be related to why the CI tests fail? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry. I don't know why the output of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No worries. I will change the test to be more tolerant after we merge this. |
||
styles | ||
views | ||
|
@@ -22,26 +21,26 @@ fontello.woff2 | |
tmp/theme-test/styles: | ||
_anchor.scss | ||
_breadcrumbs.scss | ||
_coderay.scss | ||
_code.scss | ||
_coderay.scss | ||
_general.scss | ||
_icons.scss | ||
_image.scss | ||
_keyboard.scss | ||
_line.scss | ||
_list.scss | ||
main.scss | ||
_manifest.scss | ||
_mixins.scss | ||
_nav.scss | ||
_search.scss | ||
_table.scss | ||
_typography.scss | ||
main.scss | ||
|
||
tmp/theme-test/views: | ||
_breadcrumbs.slim | ||
document.slim | ||
_index_nav.slim | ||
layout.slim | ||
_nav.slim | ||
document.slim | ||
layout.slim | ||
search.slim |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this would be better in
StringRefinements#to_label
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. You are right