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

New Check Proposal: Link protocol #542

Closed
jugglinmike opened this Issue Apr 16, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@jugglinmike
Contributor

jugglinmike commented Apr 16, 2015

We've recently purchased an SSL certificate for serving our nanoc-powered site. I'd like to avoid mixed content warnings by ensuring all embedded content is specified with a secure protocol or a protocol-relative URL. In order to prevent regressions, I'd like to implement an automated test for this.

This seems in line with nanoc's current checks--would a patch implementing nanoc check secure-links (or similar) be considered?

@ddfreyne

This comment has been minimized.

Show comment
Hide comment
@ddfreyne

ddfreyne Apr 16, 2015

Member

A good idea!

This shouldn’t be too difficult to implement. Off the top of my head, I think the following changes will need to be made:

  • The existing links collector will probably need to be updated to capture some context (img src, a href, link href, …) so that it can restrict itself to included resources only.
  • The base URL will need to be set in the site configuration so that the checker knows whether a URL is acceptable.
Member

ddfreyne commented Apr 16, 2015

A good idea!

This shouldn’t be too difficult to implement. Off the top of my head, I think the following changes will need to be made:

  • The existing links collector will probably need to be updated to capture some context (img src, a href, link href, …) so that it can restrict itself to included resources only.
  • The base URL will need to be set in the site configuration so that the checker knows whether a URL is acceptable.
@ddfreyne

This comment has been minimized.

Show comment
Hide comment
@ddfreyne

ddfreyne Apr 16, 2015

Member

You can take a stab at implementing this if you want!

Member

ddfreyne commented Apr 16, 2015

You can take a stab at implementing this if you want!

@ddfreyne ddfreyne added the feature label Apr 18, 2015

@ddfreyne ddfreyne added this to the 3.8 milestone Apr 18, 2015

@ddfreyne ddfreyne closed this in #543 Apr 19, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment