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

docs: add npm version to every local help output #7479

Merged
merged 3 commits into from
May 7, 2024

Conversation

klm-turing
Copy link
Contributor

@klm-turing klm-turing commented May 6, 2024

Every page of npm help display the local npm version.

This pull request helps the local reader of the documentation to know which version of the documentation they are reading.

References

Closes: #7110

@klm-turing klm-turing requested a review from a team as a code owner May 6, 2024 18:16
@wraithgar
Copy link
Member

If we do this we should also add to the man page footer.

@klm-turing
Copy link
Contributor Author

klm-turing commented May 6, 2024

@wraithgar . It will be done. Please which place seems the best for you ?
2024-05-06_18-44

@wraithgar
Copy link
Member

If you run a command like man ls and scroll to the bottom you will typically see in the center a date, and on the sides an os version.

The console output of help pages should probably also do this, currently it displays the build date and the man page name.

@klm-turing
Copy link
Contributor Author

klm-turing commented May 6, 2024

I look carefully and it seems that the only place where the .TH macro responsible for header and footer is used is in the genManPage function inside test>lib>commands>help folder. Is it OK if i update the .TH macro there ?

@klm-turing
Copy link
Contributor Author

klm-turing commented May 7, 2024

@wraithgar Found it and successfully add the version on each man page. I had to configure the remark-man plugin.
Screenshot from 2024-05-07 16-19-24

Is it enough or should we have maybe @version => @10.7.0 or ${name}@{version} => [email protected]

@wraithgar
Copy link
Member

Yeah [email protected] is probably the best option here (congrats on being able to use the one exception to never capitalizing npm)

@wraithgar wraithgar changed the title docs: Add npm version to every local help output documentation docs: Add npm version to every local help output May 7, 2024
@wraithgar wraithgar changed the title docs: Add npm version to every local help output docs: add npm version to every local help output May 7, 2024
@wraithgar
Copy link
Member

Tested locally:
the footer of "npm help install" showing the new npm@version

@wraithgar wraithgar merged commit 268303c into npm:latest May 7, 2024
12 checks passed
@github-actions github-actions bot mentioned this pull request May 7, 2024
@klm-turing klm-turing deleted the docs-add-npm-version branch May 14, 2024 15:46
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.

[DOCS] Every page of npm help <x> should display the local npm version
2 participants