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

Compatibility with native middleman redirects #7

Open
smith opened this issue Aug 21, 2014 · 3 comments
Open

Compatibility with native middleman redirects #7

smith opened this issue Aug 21, 2014 · 3 comments
Assignees

Comments

@smith
Copy link
Contributor

smith commented Aug 21, 2014

As of Middleman 3.1.2, middleman has a built-in redirect method that you can use to generate pages with meta refreshes.

Unfortunately, the API for this is different than middleman-s3_redirect, since it uses:

redirect '/foo/bar', to: '/baz'

could there be a way to make the built-in redirects work in development, but use the s3 redirects when deploying, all with the same syntax? That would be nice. Thanks!

@dpehrson
Copy link

dpehrson commented Jan 7, 2015

I've been looking into this as well and would actually just like to see this entire gem merged into middleman-s3_sync if possible.

One oddity I noticed in middleman is that there doesn't seem to be a way to access the to: value of the Middleman::Sitemap::Extensions::Redirects::RedirectResource objects. The value is stored in the request_path instance variable, but the #request_path method doesn't actually return that value, in fact the method is explicitly commented out, strangely.

@fredjean You have more experience than myself, would it be possible to hook into the newer middleman functionality and simply override the built-in functionality when building/syncing? Also, would it be possible to just merge this behavior into middleman-s3_sync?

@fredjean fredjean self-assigned this Jan 7, 2015
@fredjean
Copy link
Owner

fredjean commented Jan 8, 2015

I'm currently working on getting middleman-s3_sync ready for Middleman 4.0.0. This will get me some knowledge on how to get to the sitemap.

I'm not sure yet whether I want to merge both gems, but updating the redirects to use the same syntax as the Middleman one does make sense.

@pomartel
Copy link

I just ran into this issue myself and was also wondering if there is a workaround or a fix to make this work on my local machine. Thanks!

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

No branches or pull requests

4 participants