You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! I recently submitted the PR #187 that fixed a few relative links on the website.
After, I wondered if there were any more. I checked out the repo, started middleman and ran broken-link-checker. I was surprised to find: It reported the exact links that I just fixed.
Indeed: Due to the fact that middleman does NOT add trailing slashes to paths, but Github Pages does, the website works perfectly fine in development, but not in production.
I installed Rack Rewrite and added this to the config.rb to sync the behaviour:
require'rack/rewrite'configure:developmentdouse ::Rack::Rewritedo# add trailing slash, like Github Pagesr301%r{/features/(.*)},'/features/$1/',not: %r{/$}endend
I ran the broken-link-checker again, and this time, it found links that were really broken, around ~75. I think they all have the same problem, that don't account for the trailing slash.
We use the umbrella rspec-dev repo to run a task that converts projects' gherkin to Markdown and puts it in this repo.
E.g. this doc that you've fixed is generated from this feature spec.
If this process results in broken links, next time we run this task will overwrite what you've manually fixed.
Do you think you know how to fix this?
Adding a broken link checker would be a very nice addition to our CI, which we don't really have in this repo.
Hello! I recently submitted the PR #187 that fixed a few relative links on the website.
After, I wondered if there were any more. I checked out the repo, started middleman and ran broken-link-checker. I was surprised to find: It reported the exact links that I just fixed.
Indeed: Due to the fact that middleman does NOT add trailing slashes to paths, but Github Pages does, the website works perfectly fine in development, but not in production.
I installed Rack Rewrite and added this to the
config.rb
to sync the behaviour:I ran the broken-link-checker again, and this time, it found links that were really broken, around ~75. I think they all have the same problem, that don't account for the trailing slash.
I was wondering if it would make sense to fix these in a PR or not? I noticed that the markdown files basically mirror the files in the repo: https://github.com/rspec/rspec-rails/blob/main/features/controller_specs/README.md so I'd guess that it doesn't make sense to edit all the files here manually?
I'd be happy to help, but I think I need someone to point me in the right direction.
The text was updated successfully, but these errors were encountered: