-
-
Notifications
You must be signed in to change notification settings - Fork 41
Add latest link to site #72
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
Conversation
string.gsub(JS_ESCAPE_PATTERN) { |match| '\\' + JS_ESCAPES[match] } | ||
end | ||
RSpecInfo::Helpers.rspec_documentation_latest(source_dir).each do |gem_name, version| | ||
proxy "/documentation/latest/#{gem_name}/", "/documentation/#{version}/#{gem_name}/index.html" |
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.
Playing around with this locally, it looks like this works for the root README page for each gem but not for any pages under that. For rspec/rspec-expectations#823, we really just want http://rspec.info/documentation/latest/rspec-expectations/RSpec/Matchers/MatcherProtocol.html to proxy or redirect to http://rspec.info/documentation/3.3/rspec-expectations/RSpec/Matchers/MatcherProtocol.html but that's not working right now.
Can you think of a way to make this work for all the doc pages?
Also, redirects would be better than serving the same content at a second URL. Of course, with a static site generator you can't choose HTTP status codes to respond with to do a proper redirect but we could use a meta refresh tag. Thoughts?
/cc @JonRowe
What about this one? |
I tried a few ones and it worked for me.
Fixed. |
Do you think your could split the commits for the refactoring vs the additional redirect? bit hard to understand in one chunk |
Better? |
This was not a perfect split. this is new: https://github.com/dg-ratiodata/rspec.github.io/commit/599dab46be37940d58e8c4d18aba88f68a452369#diff-6050de8c34f91c732c56fe76c1374b7cR24 |
@@ -0,0 +1,5 @@ | |||
- content_for(:senarios) do |
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.
s/senarios/scenarios/
...although, why call it that?
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.
Oh. C&P error. Sorry. Took that one from their documentation. Should have been - content_for(:head) do
. Was a bit in a hurry.
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.
No worries :). Mind fixing it? Seems necessary for it to work properly. I'll be happy to merge once that's fixed.
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.
Jup... In the next 30 mins I think... I just need to finish my breakfast ;-).
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.
You must be in a different time zone. It's 11 PM here and I'll be going to bed shortly :).
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.
Well it's almost 5pm on friday here ;)
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. Fixed.
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.
Sure, Germany: http://www.timeanddate.com/worldclock/germany/berlin 😄 @JonRowe Oh, then weekend is near.
Thanks. |
Great. |
@myronmarston Now you can have
/documentation/latest/rspec-expectations
(http://localhost:4567/documentation/latest/rspec-expectations/). Referencing rspec/rspec-expectations#823 here. I usedmiddleman
's proxy-method for this. This requires a valid entry in the sitemap as destination. This only works forindex.html
. Ok?