-
Notifications
You must be signed in to change notification settings - Fork 18
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
Idea: rewrite using wget #37
Comments
The good thing about this idea is speed. Second is more possiblities. For example, when you download a Grav skeleton package, things could be in places that doesn't fit your own requirements. Even some themes seem to have pretty weird locations for files. Like, having a CSS file in /folder/folder/folder. This impacts speed. CSS should be at most in 1 folder in relation to the whole website. Same counts for JS files and images. (I think it's called chaining request?) Downside? Too much possiblities. confusing the user. |
Thanks, I appreciate you taking the take to reflect on this. If I ever do it, it will be a v2 probably. |
There is also an even more tried and proven tool that could do all the work in the background, it's httrack. Its very sophisticated in making sites static, possibly even pagination etc. |
@testbird I used it once like 15 years ago, although I didn't realize it had a command line version. Neat. |
Hello! Assets like css, scripts and fonts are not copied. URLs still refer to the original site. Parent pages to subpages are not copied. I have tried all wget options and I also had long discussions with a new friend of mine (chatGPT). The blackhole plugin seems to work fine though. :-) /Johan |
This plugin could be rewritten to use wget. It would then account for things like pagination which Blackhole does not catch right now. Most of the features could be implemented and this would not require nearly as much code upkeep as Grav continues to develop and change. I can't think of any reason why this wouldn't work well, but maybe you can. To me, it seems too easy.
shell_exec("wget ...");
Since there would be user input, it would just need to have all options sanitized.
escapeshellarg($input);
The text was updated successfully, but these errors were encountered: