Skip to content

Add hyperlink to Formatting #4397

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

dapeleg-dn
Copy link

- What I did
Change the text of https://docs.docker.com/go/formatting/ to a hyperlink.

- How I did it
Change the text to Markdown hyperlink format.

- How to verify it
Make sure you see the text as a link and that it's clickable and takes you to the desired page.

- Description for the changelog

Change the text of https://docs.docker.com/go/formatting/ to a hyperlink.

- A picture of a cute animal (not mandatory but encouraged)

@vvoland
Copy link
Collaborator

vvoland commented Jul 3, 2023

Thank you for contributing! It appears your commit message is missing a DCO sign-off,
causing the DCO check to fail.

We require all commit messages to have a Signed-off-by line with your name
and e-mail (see "Sign your work"
in the CONTRIBUTING.md in this repository), which looks something like:

Signed-off-by: YourFirsName YourLastName <yourname@example.org>

There is no need to open a new pull request, but to fix this (and make CI pass),
you need to amend the commit(s) in this pull request, and "force push" the amended
commit.

Unfortunately, it's not possible to do so through GitHub's web UI, so this needs
to be done through the git commandline.

You can find some instructions in the output of the DCO check (which can be found
in the "checks" tab on this pull request), as well as in the Moby contributing guide.

Steps to do so "roughly" come down to:

  1. Set your name and e-mail in git's configuration:

    git config --global user.name "YourFirstName YourLastName"
    git config --global user.email "yourname@example.org"

    (Make sure to use your real name (not your GitHub username/handle) and e-mail)

  2. Clone your fork locally

  3. Check out the branch associated with this pull request

  4. Sign-off and amend the existing commit(s)

    git commit --amend --no-edit --signoff

    If your pull request contains multiple commits, either squash the commits (if
    needed) or sign-off each individual commit.

  5. Force push your branch to GitHub (using the --force or --force-with-lease flags) to update the pull request.

Sorry for the hassle (I wish GitHub would make this a bit easier to do), and let me know if you need help or more detailed instructions!

| [`-f`](#format), [`--format`](#format) | `string` | | Format output using a custom template:<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
| [`-f`](#format), [`--format`](#format) | `string` | | Format output using a custom template:<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to [Formatting](https://docs.docker.com/go/formatting/) for more information about formatting output with templates |
Copy link
Member

Choose a reason for hiding this comment

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

This part of the markdown is generated from source-code, and in this case the URL is part of the flag description.

We'll probably need to think how to fix this specific case; on the command-line (assuming we want to include the URL), we need to print the URL "as-is", but in the generated documentation, we want to make the link clickable.

The alternative could be to

  • not include a link as part of the flag description
  • make sure all commands have at least a basic section in the docs that describes the flag (like on https://docs.docker.com/engine/reference/commandline/info/)
  • and then have a link inside that section that links to the formatting section
  • and the --help output for the command to print a link to the reference docs

Copy link
Author

Choose a reason for hiding this comment

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

Thanks, @thaJeztah, for your comment. I am unfamiliar with this project, but if these files of the documentation section are generated from the source code, why are they committed to Git instead of just being generated on-the-fly as part of the CI?

Copy link
Author

Choose a reason for hiding this comment

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

And, by the way, I came to this fix from the edit this page link on https://docs.docker.com/engine/reference/commandline/ps/ page.

However, I see in docs/README.md in this repo that:

The documentation for Docker Engine has been merged into
[the general documentation repo](https://github.com/docker/docker.github.io). 

So maybe the change needs to be done in https://github.com/docker/docs repo. Therefore, the edit this page link needs to be updated accordingly on the public website.

Signed-off-by: David Peleg <107049994+dapeleg-dn@users.noreply.github.com>
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.

3 participants