Skip to content

Add external links to the 'docs' directory#4

Open
github-learning-lab[bot] wants to merge 1 commit intomainfrom
add-links
Open

Add external links to the 'docs' directory#4
github-learning-lab[bot] wants to merge 1 commit intomainfrom
add-links

Conversation

@github-learning-lab
Copy link
Copy Markdown
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.

Comment thread .circleci/config.yml

- run:
name: run html proofer
command: REPLACE-ME-WITH-SCRIPT
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
command: REPLACE-ME-WITH-SCRIPT
command: bundle exec htmlproofer ./_site --check-html

@github-learning-lab github-learning-lab Bot mentioned this pull request Apr 16, 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.

2 participants