-
-
Notifications
You must be signed in to change notification settings - Fork 746
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
Path prefix not added when using the directory_indexes extension and http_prefix #1932
Comments
Great bug report. Thank you. Does this work?
|
@tdreyno Thanks for the prompt reply. 😀 As suggested I've tried the following and it does correctly prefix:
I think linking to the directory feels cleaner. I am happy to put together a PR to add support to linking to directories with |
Yeah, the URL rewriting code basically says "can I find this URL in the site, if so, modify". It'll never find the version without the There is an This should probably happen pretty deep in. In There is also a I'd love a PR. It's a bunch of somewhat conflicting extensions all trying to avoid stepping on each others' toes. |
Has this been resolved? |
@abolishme Hello 👋. Unfortunately, it is still an issue on latest middleman (v4.1.12 as of writing). I didn't get a chance to look into creating a PR with a fix as I ended up not using github-pages so I didn't need to set a prefix path. I've updated the sample app at https://github.com/murraysum/deploy-test to show it is still an issue in 4.1.12. |
Still an issue with 4.3.7, |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
stale bots... |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
unstale |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
has this been fixed? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
unstale |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Any news? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Issue
When using the
set :http_prefix, "/deploy-test"
configuration and thedirectory_indexes
extension the path is not always prefixed when using thelink_to
helper.If you use the
link_to
helper with the source file then it correctly prefixes the"/deploy-test"
path:However, if you use the
link_to
helper with a directory path then it doesn't prefix the"/deploy-test"
path:Expected Behaviour
I would expect that when linking to the directory path when using the
directory_indexes
extension would prefix/deploy-test
Actual Behaviour
Linking to the directory path when using the
directory_indexes
extension does not prefix/deploy-test
Reproducibility
I searched the documentation/previous issues and couldn't find anything related to this. Apologises if there has been. I've created a sample app on Middleman v4.1.9 at https://github.com/murraysum/deploy-test and it is deployed to http://murraysum.github.io/deploy-test/
config.rb
- https://github.com/murraysum/deploy-test/blob/master/config.rbindex.html.erb
- https://github.com/murraysum/deploy-test/blob/master/source/index.html.erbPlease let me know if you need any help reproducing. Thanks 👍
The text was updated successfully, but these errors were encountered: