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

Test link checker on links in markdown codeblock #951

Closed
wants to merge 1 commit into from

Conversation

kilfoyle
Copy link
Contributor

@kilfoyle kilfoyle commented Feb 23, 2024

This tests three raw link formats inside a markdown codeblock:

[source, markdown]
----------------------------------
I am a humble markdown codeblock.

TEST 1 - Here is a URL in mid-sentence:
This investigation guide uses https://www.elastic.co/guide/en/security/current/osquery-placeholder-fields.html to dynamically pass alert data into Osquery queries.

TEST 2 - Here is a URL with no following text:
This investigation guide uses https://www.elastic.co/guide/en/security/current/es-ui-overview.html

TEST 3 - Here is a URL demarkated by single quotes:
This investigation guide uses 'https://www.elastic.co/guide/en/security/current/security-assistant.html'
----------------------------------

Interestingly, the URL renders much more nicely if we wrap it inside single quotes (Test 3), but I don't know which of these will pass our docs build CI check.

Screenshot 2024-02-23 at 5 17 38 AM


And the results are in:

2024-02-23 05:36:59 EST | INFO:build_docs:Bad cross-document links:
-- | --
  | 2024-02-23 05:36:59 EST | INFO:build_docs:  /tmp/docsbuild/target_repo/html/en/fleet/master/fleet-troubleshooting.html contains broken links to:
  | 2024-02-23 05:36:59 EST | INFO:build_docs:   - en/security/current/security-assistant.html'
  | 2024-02-23 05:37:26 EST | 🚨 Error: The command exited with status 255

Only Test 3 failed, so it seems the link should pass CI checks as long as there is whitespace after the .html. So I guess the full URL must be surrounded, before and after, by whitespace.

@kilfoyle kilfoyle requested a review from a team as a code owner February 23, 2024 10:21
Copy link

A documentation preview will be available soon.

Request a new doc build by commenting
  • Rebuild this PR: run docs-build
  • Rebuild this PR and all Elastic docs: run docs-build rebuild

run docs-build is much faster than run docs-build rebuild. A rebuild should only be needed in rare situations.

If your PR continues to fail for an unknown reason, the doc build pipeline may be broken. Elastic employees can check the pipeline status here.

@kilfoyle
Copy link
Contributor Author

Test complete.

@kilfoyle kilfoyle closed this Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant