Hacker News new | past | comments | ask | show | jobs | submit login

Today I learned your can crawl all the pages of your website using a simple wget command:

  check-links:
   @echo "NOTE: Ensure 'make run-site-deep' is running before running this target"; echo
   -wget -r -l 0 --spider -nd -nv http://localhost:8000/ -o run.log
   grep -B1 broken run.log
   @echo Done; echo
Source: https://github.com/susam/susam.net/blob/08a2d7b/Makefile#L37...



Two leading spaces preserves the code formatting

  check-links:
   @echo "NOTE: Ensure 'make run-site-deep' is running before running this target"; echo
   -wget -r -l 0 --spider -nd -nv http://localhost:8000/ -o run.log
   grep -B1 broken run.log
   @echo Done; echo


… though Make still requires tabs for indentation, so you can’t preserve the functionality here on HN!


Thanks! Updated.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: