From 382967ccdd3518782022d0ae4ed70684a52e3343 Mon Sep 17 00:00:00 2001 From: Ethan Palm <56270045+ethanpalm@users.noreply.github.com> Date: Fri, 22 Mar 2024 10:57:46 -0700 Subject: [PATCH] [Content strategy bug fix] Update content linter guidance (#49792) --- .../using-the-content-linter.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/content/contributing/collaborating-on-github-docs/using-the-content-linter.md b/content/contributing/collaborating-on-github-docs/using-the-content-linter.md index 201c200dd1e1..2eda0687d134 100644 --- a/content/contributing/collaborating-on-github-docs/using-the-content-linter.md +++ b/content/contributing/collaborating-on-github-docs/using-the-content-linter.md @@ -110,6 +110,22 @@ Errors must be addressed before merging your changes to the `main` branch. Warni {% data reusables.contributing.content-linter-rules %} +### Syntax for linting rules + +Some linting rules return warnings or errors based on HTML comments that you can add to articles. + +#### Syntax for expiring and expired content + +Rules `GHD038` and `GHD039` check for content that has been manually given an expiration date. Fourteen days before the specified date, the content linter will return a warning that the content is expiring soon. Starting on the specified date, the content linter will return an error and flag the content for remediation. + +You can add an expiration date to content by wrapping it in HTML tags that contain an expiration date in the format:
<!-- expires yyyy-mm-dd --> <!-- end expires yyyy-mm-dd -->
+ +**Use:** + +```markdown +This content does not expire. {% raw %}<{% endraw %}!-- expires 2022-01-28 -->This content expires on January 28, 2022. {% raw %}<{% endraw %}!-- end expires 2022-01-28 -->This content also does not expire. +``` + ## Suppressing linter rules Rarely, you may need to document something that violates one or more linter rules. In these cases, you can suppress rules by adding a comment to the Markdown file. You can disable all rules or specific rules. Always try to limit as few rules as possible. You can disable a rule for an entire file, for a section of a Markdown file, a specific line, or the next line.