Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add external links to the 'docs' directory #4

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

github-learning-lab[bot]
Copy link
Contributor

With the addition of links to our code base, we should add a unit test as one of our CircleCI jobs that run whenever it builds.

Let's add a test using HTMLProofer to test for any broken links, images, or HTML. By adding this to our testlinks unit test, HTMLProofer will test our code before it gets merged.

CircleCI allows us to configure multiple jobs using a feature called Workflows. Since we're interested in performing two jobs (a build, and a test for links), we'll use Workflows.

I've already added some things necessary for HTMLProofer test to run, and implemented the use of the Workflows feature. Next, replace the placeholder text with the following:

bundle exec htmlproofer ./_site --check-html

Step 9: Add an HTMLProofer unit test

Let's make sure all links are valid by adding a link checker unit test.

⌨️ Activity: Check for broken links using CircleCI

  1. In this pull request, replace the REPLACE-ME-WITH-SCRIPT placeholder text with bundle exec htmlproofer ./_site --check-html. You can do this by editing the file from the Files changed tab, or by scrolling down and accepting the suggested change.

I'll respond below with your next step.

- checkout

- run:
name: build dependencies
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name: build dependencies
command: bundle exec htmlproofer ./_site --check-html

@github-learning-lab github-learning-lab bot mentioned this pull request May 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants