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

Configure Hugo to allow copying code blocks to clipboard #77

Closed
1 task done
johnthagen opened this issue May 16, 2022 · 3 comments · Fixed by #84
Closed
1 task done

Configure Hugo to allow copying code blocks to clipboard #77

johnthagen opened this issue May 16, 2022 · 3 comments · Fixed by #84
Assignees
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@johnthagen
Copy link
Contributor

  • I have searched the issues of this repo and believe that this is not a duplicate.

Issue

Many static site generators support a copy-to-clipboard button for code blocks. For example, see a Material for Mkdocs example:

GitHub also supports this, for example hover over the code blocks here:

This is especially useful for new users who want to quickly copy out commands such as the installation command that doesn't all fit on the screen at once.

It doesn't seem like this is something that Hugo supports out of the box unfortunately, but there are several guides on it:

@johnthagen johnthagen added the documentation Improvements or additions to documentation label May 16, 2022
@abn
Copy link
Member

abn commented May 16, 2022

Happy to accept PRs for this.

The website code is available at https://github.com/python-poetry/website

@Secrus
Copy link
Member

Secrus commented May 17, 2022

Moving python-poetry/poetry#4981 here, as its original issue, but this one provides more info on how to handle the task.

@Secrus Secrus self-assigned this May 19, 2022
@finswimmer finswimmer transferred this issue from python-poetry/poetry Aug 31, 2022
@neersighted
Copy link
Member

An attempt was made in #37 but was reverted due to unforeseen breakage in production -- PRs attempting again using that one as a base are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants