Misiur / buster

Brute force static site generator for Ghost
MIT License
24 stars 6 forks source link

Buster dosn't copy well assets into static folder #2

Open ythecombinator opened 9 years ago

ythecombinator commented 9 years ago

Initially I thought that Buster didn't copy the relevant asset files from the local server to the static folder since the static version of my page had no valid CSS and JS and I had seen a similar open issue here. But after taking a look at the generated static folder I could find the assets subdirectory but unfortunatelly I found out that the CSS and JS files were there but with different names, like main.min.css@v=79f299cdc8 instead of just main.min.css.

I thought it could be just a theme issue from my current theme but I noticed it happens with other themes too.

My system: Windows 8.1 4 GB RAM Administrative account Using Git Bash (Wget is installed) No errors for in the npm console whilst Buster is brute-forcing the files


I noticed that when the reported problem happens in the end it also throws IOError: Your ghost server is dead.

print-blog

Misiur commented 9 years ago

Ok, so: wget downloads all files it can find. If it sees main.css?v=20 it will save it as such. However, ntfs can't handle ? in filenames, so wget replaces them with @. Buster later removes the whole querystring, so just main.css remains. I added that error if wget exit code is different than 0, but it seems it has some other successful exit codes, I've got to take a look at it. For now, if you are using python script directly just comment out that exception, and the renaming should take place.