phaserjs / phaser

Phaser is a fun, free and fast 2D game framework for making HTML5 games for desktop and mobile web browsers, supporting Canvas and WebGL rendering.
https://phaser.io
MIT License
37.2k stars 7.1k forks source link

162 dead links on phaser.io #6758

Closed akesterson closed 5 months ago

akesterson commented 8 months ago

Version

Description

There are 162 broken links on the phaser.io website. The complete list is attached as brokenlinks.csv.

$ head -n 5 brokenlinks.csv
BROKEN_LINK,REFERRER
/phaser3/devlog,https://phaser.io/learn
/learn/official-tutorials,https://phaser.io/download
/download/release/3.80.0,https://phaser.io/news/2024/02/phaser-3.80.0-released
/tutorials/community-tutorials,https://phaser.io/tutorials/getting-started-phaser3
....

Example Test Code

I gathered these statistics with wget and some really really ugly bash. It is reproducible.

Gather raw output from wget --spider. Go build a bridge, this takes a while.

wget --debug --spider -r -nd -nv -l 10 -w 2 -o phaser_wget.log 2> phaser_wget.debug.log https://phaser.io/

... Parse the wget log for broken links and transform that into a CSV ...

cat phaser_wget.log |\
    grep -E '((HEAD|GET).*HTTP/1.1|^Referer:|broken link)' | \
    grep -B 2 "broken link" | \
    sed -e s/'--'//g \
        -e s/'Referer: '/''/g \
        -e s/'GET'/''/g \
        -e s/'HEAD '/''/g \
        -e s/'Remote file does not exist.*'//g \
        -e s/' HTTP\/1.1'/','/g -e s/'Found .*'//g | \
    grep -v '^$' | \
    sed s/'^\s*\/'/';\/'/g | \
    tr -d '\n\r' | \
    tr ';' '\n' > brokenlinks.csv

... stats are gathered from brokenlinks.csv :

cat brokenlinks.csv | grep -Eo '^/[a-zA-Z0-9_\-]+/' | cut -d / -f 2 | sort | uniq -c | sort -nr

Additional Information

A (much MUCH) cleaner version of that script could be ran against the generated phaser site before it is published to identify broken links as a CI/CD gateway. If someone would point me to the pipeline I'd be happy to contribute a PR for that action.

brokenlinks.csv

akesterson commented 8 months ago

Relates to #6757

photonstorm commented 8 months ago

Thanks for the list. Dead news links I'm less bothered about, depending on the age, due to the fact we're dealing with a decade's worth of news here, so it's not surprising some of those links no longer work. We will tag old articles with a relevant warning (and potentially a link to archive.org). The other links are more important though, so we'll look at them next week.

photonstorm commented 5 months ago

Closing this because we've fixed all of the important broken links. Legacy ones are at the site owners discretion.