Skip to content

Enable code block copy button on documentation site #212

Description

Context

The PSModule documentation site (psmodule.io) renders code blocks from the README and other documentation pages. Users need to be able to copy code snippets easily to use them in their own scripts.

Request

Code blocks on the documentation site should have a copy button so users can quickly copy the code content to their clipboard.

Screenshot showing code blocks without copy functionality

Acceptance criteria

  • Code blocks on the documentation site have a visible copy button
  • Clicking the copy button copies the code content to the clipboard
  • The feature works across all documentation pages

Technical decisions

Approach: Material for MkDocs (and Zensical) support the code copy feature via the content.code.copy configuration in mkdocs.yml.


Implementation plan

  • Enable content.code.copy: true in the mkdocs.yml theme features
  • Verify the copy button appears on code blocks in the built documentation
  • Test across different page types (README, function docs, examples)

Activity

  1. MariusStorhaug commented on Oct 13, 2025

    @MariusStorhaug
    MemberAuthor

    need something like:

    theme:
      name: material
      features:
        - content.code.copy
    
  2. changed the title [-]🩹 [Patch]: Make it possible to copy codeblocks from the readme (psmodule.io/<name>[/-] [+]Enable code block copy button on documentation site[/+] on Apr 5, 2026
  3. MariusStorhaug commented on Apr 5, 2026

    @MariusStorhaug
    MemberAuthor

    Restructured issue description into the standard three-section format.

    • Rewrote from a one-line description with screenshot into a proper context/request structure
    • Updated title to imperative mood (removed emoji prefix)
    • Added technical decision pointing to Material for MkDocs code copy feature
    • Created implementation plan with 3 tasks
    • Applied Patch label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions