Skip to content
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

Add pretty public plugin #216

Closed

Conversation

jaredcwhite
Copy link

Supersedes #215.

plugin :pretty_public

route do |r|
  r.pretty_public
end

makes this work:

/path/to/file => /path/to/file.html
/another/path => /another/path/index.html

And there are options to override the list of extensions checked as well as switch it to prioritize files over folders with an index.

BTW, if you can think of a better name than pretty_public I'm all ears. I thought of extensionless_public but that's quite a mouthful!

P.S. I was hoping to test this working in conjunction with multi_public, but that would require a change to public_path_segments in the public plugin to accept the specific Rack::File server root.

@jeremyevans
Copy link
Owner

As requested in #215, can you please post about this on the Google Group and see if there is community support for this to be included with Roda?

@jeremyevans
Copy link
Owner

I don't want to keep this in limbo indefinitely. There doesn't seem to be a strong desire from the community to include this with Roda, so I think it's best kept as an external plugin. If you decide to release it as an external plugin, please consider sending a PR to add a link to the external plugin on the website (edit www/pages/documentation.erb).

@jaredcwhite
Copy link
Author

OK, I probably won't be able to get to it until after finishing up the Bridgetown 1.0 release, but then I'll definitely submit a link for the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants