medic / cht-docs

Documentation site for the Community Health Tookit
https://docs.communityhealthtoolkit.org
13 stars 17 forks source link

Fix 404s found in muffet CI #694

Open mrjones-plip opened 2 years ago

mrjones-plip commented 2 years ago

Recently we added a nightly CI job that does link checks for the docs site. It's finding about 40 broken links.

The structure of the errors has two parts. the first is localhost:1313 URL which correlates to the live site by swapping it out for docs.communityhealthtoolkit.org. So http://localhost:1313/apps/features/supervision/ is actually https://docs.communityhealthtoolkit.org/apps/features/supervision/. In turn you can find the source of this page here.

After the URL, you'll see the list of pages with errors.

Putting this all together, this output:

 http://localhost:1313/apps/features/supervision/
    404 https://www.who.int/hrh/community/guideline-health-support-optimize-hw-programmes/en/

Means that the link on line 15 is 404ing.

The person fixing this ticket should:

  1. Get the docs dev environment setup
  2. Serve the site locally with hugo serve
  3. Find all the 404s listed below and fix them. This might take a little effort to know where the link should be fixed to go to. It may just have to be removed if there's no good destination.
  4. Optionally re-run the link checker locally with ./.github/scripts/muffet.sh
  5. Checkout a new branch, commit and push the fixes
  6. Create a new a new pull request (PR) and get a teammate to review the PR
  7. Merge the PR and see if the links are fixes on the next daily CI run. Check the action tab for the most recent run.

Here's a list of the current 404s. I think we should stop using the placehold.it site all together. I think it's just generating a square image with the specified hex color in the URL? If we need these statically generated, I'm happy to help (@mrjones-plip ).

 http://localhost:1313/apps/features/supervision/
    404 https://www.who.int/hrh/community/guideline-health-support-optimize-hw-programmes/en/
http://localhost:1313/apps/guides/hosting/self-hosting/
    404 https://www.docker.com/sites/default/files/d8/2019-09/docker-cheat-sheet.pdf
http://localhost:1313/apps/guides/messaging/gateways/rapidpro/
    403 https://rapidpro.io/api/v2/#rate-limiting
http://localhost:1313/apps/reference/forms/app/
    404 https://github.com/medic/cht-core/blob/master/demo-forms/z-score.xml
http://localhost:1313/apps/examples/anc/
    404 https://www.who.int/healthinfo/indicators/2018/en/
http://localhost:1313/apps/reference/app-settings/
    404 https://www.npmjs.com/package/pupil#rule-strings
    404 https://www.npmjs.com/package/pupil#validation-functions
http://localhost:1313/apps/guides/integrations/openmrs/
    404 https://github.com/kmatiya/emr-yendanafe-test-script
http://localhost:1313/apps/features/integrations/rapidpro/
    404 https://community.rapidpro.io/rapidpros-api/
http://localhost:1313/apps/guides/hosting/offline/
    404 https://gist.github.com/anand-k-p/851e57c3aa43e1e36df164f1c215609e
http://localhost:1313/design/components/
    500 https://placehold.it/15/E0E0E0/000000?text=+
    no free connections available to host   https://placehold.it/15/218E7F/000000?text=+
    no free connections available to host   https://placehold.it/15/333333/000000?text=+
    no free connections available to host   https://placehold.it/15/63A2C6/000000?text=+
    no free connections available to host   https://placehold.it/15/76B0B0/000000?text=+
    no free connections available to host   https://placehold.it/15/A0A0A0/000000?text=+
    no free connections available to host   https://placehold.it/15/C78330/000000?text=+
    no free connections available to host   https://placehold.it/15/DFEAEA/000000?text=+
    no free connections available to host   https://placehold.it/15/E9AA22/000000?text=+
    no free connections available to host   https://placehold.it/15/EEF5F9/000000?text=+
    no free connections available to host   https://placehold.it/15/F0F4FD/000000?text=+
    no free connections available to host   https://placehold.it/15/F2F2F2/000000?text=+
    no free connections available to host   https://placehold.it/15/F47B63/000000?text=+
    no free connections available to host   https://placehold.it/15/FCF6E7/000000?text=+
    no free connections available to host   https://placehold.it/15/FDF1EF/000000?text=+
    no free connections available to host   https://placehold.it/15/FFFFFF/000000?text=+
    timeout https://placehold.it/15/007AC0/000000?text=+
    timeout https://placehold.it/15/7193EE/000000?text=+
    timeout https://placehold.it/15/777777/000000?text=+
    timeout https://placehold.it/15/E33030/000000?text=+
http://localhost:1313/apps/guides/integrations/rapidpro/
    404 https://community.rapidpro.io/videos/
http://localhost:1313/apps/reference/contact-page/
    404 https://github.com/medic/medic/tree/master/webapp/src/js/filters
http://localhost:1313/contribute/code/style-guide/
    403 https://docs.github.com/en/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions
    403 https://docs.github.com/en/actions/reference/encrypted-secrets
http://localhost:1313/contribute/docs/workflow/
    403 https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request
http://localhost:1313/apps/guides/integrations/best-practices/rapidpro/
    403 https://rapidpro.io/api/v2/
mrjones-plip commented 2 years ago

Noting work originally done in #366