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

Adding --cdn-assets flag that loads the Logo, CSS and JS files from jsdelivr CDN #537

Merged
merged 3 commits into from
Apr 19, 2023

Conversation

sushant-here
Copy link
Contributor

I have worked on a few projects that use slather in the last few years. I have always accepted that the HTML report viewing experience will be sub-par because there are no CSS and JS files once the report (index.html) is deployed to Azure DevOps or Bitrise (I'm sure others have similar limitations).

I propose that instead of referencing the locallogo.jpg,list.min.js, highlight.pack.jsandslather.css` relative to the HTML report, the report should instead reference a Web/CDN version. This way HTML reports will be feature-rich when deployed to these services as build artifacts.

  1. No change in default behavior. The new flag is opt-in.
  2. Reads slather logo, CSS and JS from the master branch of SlatherOrg GitHub project using jsdelivr CDN. Could consider making it more dynamic and configurable later in the future. EG adding support for tags or different forks.

Relates to: #536

First time I've written any ruby code - sorry if I've broken any conventions and/or messed up on the versioning for this PR. Let me know what I can do to get this merged ASAP :)

@sushant-here
Copy link
Contributor Author

Keen to get this in. @ksuther - you seem to be the most active recently. Please let me know what I can do to help merge this.

@ksuther
Copy link
Contributor

ksuther commented Apr 19, 2023

This looks reasonable to me, thanks for the contribution!

@ksuther ksuther merged commit 524a7f9 into SlatherOrg:master Apr 19, 2023
@sushant-here
Copy link
Contributor Author

@ksuther - are you able to create a release with this change?

@ksuther
Copy link
Contributor

ksuther commented Sep 20, 2023

Thanks for the nudge. Waiting a few days for a comment on another PR and I'll cut a release.

@ksuther
Copy link
Contributor

ksuther commented Oct 1, 2023

Included in 3.7.5!

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

Successfully merging this pull request may close these issues.

[Feature request] Host Logo(image), CSS and JS in a CDN (or just here on github)
2 participants