Skip to content

HDDS-14546. [Website v2] Add lint and lint:fix commands#318

Merged
errose28 merged 9 commits intoapache:masterfrom
yuriipalam:HDDS-14546
Mar 4, 2026
Merged

HDDS-14546. [Website v2] Add lint and lint:fix commands#318
errose28 merged 9 commits intoapache:masterfrom
yuriipalam:HDDS-14546

Conversation

@yuriipalam
Copy link
Contributor

@yuriipalam yuriipalam commented Feb 2, 2026

What changes were proposed in this pull request?

Add lint and lint:fix commands that run markdownlint and yamllint packages.

  • lint just checks for errors
  • lint:fix actually fixes issues which are possible to fix automatically. It doesn't work for yamllint though, it can only check the files.

In the next PR we plan to integrate the ESLint plugin.

There were some issues with the markdown files found by markdownlint. I fixed them, but it has to be reviewed by someone since I'm not familiar with the product. Some things required manual fixing, like proper heading ordering. markdownlint prohibits bypassing heading levels, e.g., jump from an h2 to h4 without an h3 heading between the two.

What is the link to the Apache Jira?

HDDS-14546

How was this patch tested?

  • The CI checks on my fork are passing
  • I verified the rendered content using a local preview
  • I manually verified the steps provided in this change work as described

jojochuang and others added 2 commits February 9, 2026 14:08
…re launching it (apache#326)"

This reverts commit 20b71d0.

Apply this commit to the master branch, not the HDDS-9225-website-v2 branch. We could still use this branch for future staging development
@github-actions github-actions bot added the website-v2 Tasks for the new ozone website targeting the HDDS-9225-website-v2 branch label Feb 10, 2026
@smengcl
Copy link
Contributor

smengcl commented Feb 12, 2026

PSA: Please switch PR target branch to apache:master now that the v2 website has launched.

@jojochuang jojochuang changed the base branch from HDDS-9225-website-v2 to master February 12, 2026 19:24
@yuriipalam
Copy link
Contributor Author

@smengcl can I have a review please?

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think the changes in this file of this PR is valid? Those are the remainder from the v2 launch.

Copy link
Contributor

Choose a reason for hiding this comment

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

Agree, the new site is live. We should use the master branch's version.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds linting capabilities to the Apache Ozone website v2 project by introducing lint and lint:fix npm scripts that run markdownlint and yamllint checks. The PR consolidates the previous separate GitHub Actions workflows for markdown and YAML linting into a single unified lint job, removes the now-redundant shell scripts, and fixes markdown heading level issues discovered by markdownlint in the release notes files. Additionally, it updates the docusaurus configuration with TODO comments and temporary URLs for the staging environment.

Changes:

  • Added lint and lint:fix commands to package.json for running markdownlint and yamllint
  • Consolidated GitHub Actions workflows by merging lint-markdown and lint-yaml jobs into a single lint job
  • Fixed markdown heading hierarchy in release notes to comply with markdownlint rules and Keep a Changelog format

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
package.json Added lint and lint:fix scripts for running markdownlint and yamllint
.github/workflows/static.yml Consolidated lint-markdown and lint-yaml jobs into single lint job
.github/scripts/markdownlint.sh Removed - functionality moved to package.json script
.github/scripts/yamllint.sh Removed - functionality moved to package.json script
src/pages/release-notes/2.1.0.md Fixed heading levels to follow proper hierarchy (h3→h4 for changelog subsections, h2→h3 for Downloads/Documentation)
src/pages/release-notes/2.0.0.md Fixed heading levels to follow proper hierarchy
docusaurus.config.js Added TODO comments and updated URLs/regex for staging environment
CONTRIBUTING.md Documented new lint commands and their usage

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

package.json Outdated
"write-heading-ids": "docusaurus write-heading-ids"
"write-heading-ids": "docusaurus write-heading-ids",
"lint": "markdownlint . && yamllint --format=colored \"$(git rev-parse --show-toplevel)\"",
"lint:fix": " markdownlint --fix . && yamllint --format=colored \"$(git rev-parse --show-toplevel)\""
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

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

Extra leading space in the lint:fix script value. The value should start with "markdownlint" not " markdownlint".

Suggested change
"lint:fix": " markdownlint --fix . && yamllint --format=colored \"$(git rev-parse --show-toplevel)\""
"lint:fix": "markdownlint --fix . && yamllint --format=colored \"$(git rev-parse --show-toplevel)\""

Copilot uses AI. Check for mistakes.
package.json Outdated
Comment on lines +16 to +17
"lint": "markdownlint . && yamllint --format=colored \"$(git rev-parse --show-toplevel)\"",
"lint:fix": " markdownlint --fix . && yamllint --format=colored \"$(git rev-parse --show-toplevel)\""
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

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

The yamllint command is used in both lint scripts but yamllint is not listed as a dependency in package.json. While yamllint is pre-installed on GitHub Actions runners, developers running these commands locally will need to install yamllint separately via pip or their package manager. Consider adding a note in the CONTRIBUTING.md file about this prerequisite, or explore using a Node.js-based YAML linter that can be added as a devDependency.

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Choose a reason for hiding this comment

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

While yamllint is pre-installed on GitHub Actions runners, developers running these commands locally will need to install yamllint separately via pip or their package manager. Consider adding a note in the CONTRIBUTING.md file about this prerequisite

@yuriipalam can you add this to the contributing guide?

@ptlrs
Copy link
Contributor

ptlrs commented Feb 26, 2026

@yuriipalam Could you please fix the config.js file and resolve the conflicts?

@yuriipalam yuriipalam requested a review from ptlrs February 27, 2026 16:00
@yuriipalam
Copy link
Contributor Author

yuriipalam commented Feb 27, 2026

Sure @ptlrs
Done

Copy link
Contributor

@errose28 errose28 left a comment

Choose a reason for hiding this comment

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

Thanks for adding this @yuriipalam. Can you address the open comments from the AI as well, they look valid.

I think this was broken before this PR, but while we are making changes in this area we should add build to the ignore list in the yamllint config. This passes in CI because lint is run before build, but it will fail for developers locally if they have an old build and then try to lint their current changes before building again.

package.json Outdated
Comment on lines +16 to +17
"lint": "markdownlint . && yamllint --format=colored \"$(git rev-parse --show-toplevel)\"",
"lint:fix": " markdownlint --fix . && yamllint --format=colored \"$(git rev-parse --show-toplevel)\""
Copy link
Contributor

Choose a reason for hiding this comment

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

While yamllint is pre-installed on GitHub Actions runners, developers running these commands locally will need to install yamllint separately via pip or their package manager. Consider adding a note in the CONTRIBUTING.md file about this prerequisite

@yuriipalam can you add this to the contributing guide?

@yuriipalam yuriipalam requested a review from errose28 March 3, 2026 15:33
@yuriipalam
Copy link
Contributor Author

Thanks for the review @errose28
I adopted the requested changes, asking for another review.

@errose28
Copy link
Contributor

errose28 commented Mar 3, 2026

We just need to close the loop on this markdown change but everything else looks good!

Copy link
Contributor

@errose28 errose28 left a comment

Choose a reason for hiding this comment

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

Thanks for adding this @yuriipalam. I just added back the 2.0.0 release page from master as well to fix the same as 2.1.0. Once CI is green this should be ready to merge.

@errose28 errose28 merged commit fbae715 into apache:master Mar 4, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

website-v2 Tasks for the new ozone website targeting the HDDS-9225-website-v2 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants