axitkhurana / buster

Brute force static site generator for Ghost
MIT License
802 stars 139 forks source link

buster use wget mirror the site, but the srcset image didnt convert right #94

Open minyakonga opened 5 years ago

minyakonga commented 5 years ago

here is the original source code image

here is the command printed out:

wget --recursive --convert-links --page-requisites --no-parent --directory-prefix /Users/archer.li/Documents/Python/buster/buster/static --no-host-directories --restrict-file-name=unix localhost:2368

here is the result html file code:

            <figure class="post-full-image">
                <img
                    srcset="../content/images/size/w300/2019/09/ghost_logo_big-1.png 300w,
                           ../content/images/size/w600/2019/09/ghost_logo_big-1.pngg 600w,
                          ../content/images/size/w1000/2019/09/ghost_logo_big-1.pngng 1000w,
                         ../content/images/size/w2000/2019/09/ghost_logo_big-1.pngpng 2000w"
                    sizes="(max-width: 800px) 400px,
                            (max-width: 1170px) 700px,
                            1400px"
                    src="../content/images/size/w2000/2019/09/ghost_logo_big-1.png"
                    alt="Setup Ghost and Github pages as your static blog"
                />
            </figure>
brthor commented 5 years ago

I also hit this issue. I used post-buster sed commands to fix it.

find . -type f -name '*.html' | xargs sed -i -e 's#.jpgg#.jpg#g'
find . -type f -name '*.html' | xargs sed -i -e 's#.jpgpg#.jpg#g'
find . -type f -name '*.html' | xargs sed -i -e 's#.jpgjpg#.jpg#g'

find . -type f -name '*.html' | xargs sed -i -e 's#.pngg#.png#g'
find . -type f -name '*.html' | xargs sed -i -e 's#.pngng#. png#g'
find . -type f -name '*.html' | xargs sed -i -e 's#.pngpng#. png#g'
khaytsus commented 8 months ago

I've ran into this exact same issue doing my own personal mirror script of Ghost, anyone have an idea if this a Ghost markup bug, or a wget bug?