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

Add fingerprint to compiled css/js files #439

Closed
tooooolong opened this issue Feb 9, 2018 · 8 comments
Closed

Add fingerprint to compiled css/js files #439

tooooolong opened this issue Feb 9, 2018 · 8 comments
Labels
difficulty: advanced Issues that are complex, e.g. large scoping for long-term maintainability.

Comments

@tooooolong
Copy link

tooooolong commented Feb 9, 2018

Case we have CDN front of our website, So main.css can not update automaticly.

Now, the css tag is:

<link rel="stylesheet" href="/css/main.css">

I think it should add fingerprint to static files.
Something like this:

<link rel="stylesheet" href="/css/main.build_hash.css">
@JoelMarcey JoelMarcey added the status: needs more information There is not enough information to take action on the issue. label Feb 27, 2018
@JoelMarcey
Copy link
Contributor

Hi @tooooolong! How would one know whether a fingerprint should be used? Some sort of configuration option?

@tooooolong
Copy link
Author

maybe something like this。

webpack/webpack#86 (comment)

this is a plugin for Webpack, it will add a hash to the static file name automatically.

@yangshun yangshun added the feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future. label Apr 15, 2018
@yangshun
Copy link
Contributor

yangshun commented Apr 15, 2018

This is a good idea 👍

I think fingerprinting can be turned on by default. It's also necessary in PWAs because they cache the content via paths.

This only needs to be done during the build phase. The <Head> component will need to take in the fingerprinted CSS file name and cannot hardcode main.css.

@yangshun yangshun added mentorship difficulty: advanced Issues that are complex, e.g. large scoping for long-term maintainability. and removed status: needs more information There is not enough information to take action on the issue. labels Apr 15, 2018
@gedeagas
Copy link
Contributor

gedeagas commented May 10, 2018

is anyone taking this @yangshun? I can work on this in the coming weeks

@yangshun
Copy link
Contributor

yangshun commented May 10, 2018

Sure thing, it's yours!

I've added an "issue-claimed" label so that others will know not to start work on the issue. If you change your mind about the issue, no worries! Just let me know so that I can remove the label and free it up for someone else to claim.

I'll check in with you periodically so that we can keep the task updated with the progress.

@yangshun yangshun added the status: claimed Issue has been claimed by a contributor who plans to work on it. label May 10, 2018
@gedeagas
Copy link
Contributor

Awesome 😎

@gedeagas
Copy link
Contributor

Hi, @yangshun can you check my code? #694

@endiliey endiliey added better engineering Not a bug or feature request and removed feature This is not a bug or issue with Docusausus, per se. It is a feature request for the future. labels Jun 2, 2018
@endiliey endiliey added v2 and removed status: claimed Issue has been claimed by a contributor who plans to work on it. better engineering Not a bug or feature request labels Jul 18, 2018
@endiliey endiliey added v2-mvp and removed v2 labels Aug 28, 2018
@endiliey
Copy link
Contributor

Implemented in v2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: advanced Issues that are complex, e.g. large scoping for long-term maintainability.
Projects
None yet
Development

No branches or pull requests

5 participants