Skip to content

Add copy instructions button to docs homepage#938

Closed
Copilot wants to merge 3 commits intomainfrom
copilot/fix-55ab6769-0448-40ad-b82b-e43677b008b6
Closed

Add copy instructions button to docs homepage#938
Copilot wants to merge 3 commits intomainfrom
copilot/fix-55ab6769-0448-40ad-b82b-e43677b008b6

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Sep 19, 2025

Added a prominent "Copy Instructions (.github/instructions)" button to the top of the GitHub Agentic Workflows documentation homepage that allows users to easily copy the complete instructions template to their clipboard.

What this adds

The new button provides a convenient way for users to copy the entire contents of pkg/cli/templates/instructions.md directly from the documentation site. This makes it much easier for developers to get started with GitHub Agentic Workflows by providing instant access to the comprehensive instructions template that can be pasted into their own repositories' .github/instructions/ directory.

Implementation details

  • Custom Astro component: Created CopyInstructionsButton.astro that reads the instructions content at build time
  • Strategic placement: Positioned prominently after the hero section and before the main content
  • Professional styling: Uses Starlight's accent color scheme with hover effects and accessibility features
  • User feedback: Shows "✓ Copied!" success message or "✗ Copy failed" error message for 2 seconds
  • Error handling: Gracefully handles clipboard access failures and file reading errors
  • Browser compatibility: Uses modern Navigator Clipboard API with proper fallbacks

Why this is useful

The instructions template contains nearly 1000 lines of comprehensive documentation about GitHub Agentic Workflows syntax, configuration options, security considerations, and best practices. Having this available as a one-click copy operation significantly reduces friction for new users who want to set up proper instructions for AI coding agents in their repositories.

Copy Instructions Button

The button integrates seamlessly with the existing documentation design and provides immediate access to the complete GitHub Agentic Workflows instructions template.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • api.contoso.com
    • Triggering command: /tmp/go-build2984995671/b304/cli.test -test.testlogfile=/tmp/go-build2984995671/b304/testlog.txt -test.paniconexit0 -test.v=true -test.timeout=3m0s (dns block)
    • Triggering command: /tmp/go-build2682131174/b304/cli.test -test.testlogfile=/tmp/go-build2682131174/b304/testlog.txt -test.paniconexit0 -test.v=true -test.timeout=3m0s (dns block)
  • https://api.github.com/repos/githubnext/gh-aw/releases
    • Triggering command: node /home/REDACTED/work/gh-aw/gh-aw/docs/node_modules/.bin/astro dev (http block)
    • Triggering command: node /home/REDACTED/work/gh-aw/gh-aw/docs/node_modules/.bin/astro build (http block)
  • telemetry.astro.build
    • Triggering command: node /home/REDACTED/work/gh-aw/gh-aw/docs/node_modules/.bin/astro dev (dns block)
    • Triggering command: node /home/REDACTED/work/gh-aw/gh-aw/docs/node_modules/.bin/astro build (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add a button the Astro starlight docs template that copies the content of pkg/cli/template/instructions.md to the clipboard. - the button should be visible at top of the top of the page. Add copy instructions button to docs homepage Sep 19, 2025
Copilot AI requested a review from pelikhan September 19, 2025 05:19
@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot show screenshot

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Sep 19, 2025

@copilot show screenshot

Here's a screenshot showing the copy instructions button in action:

Copy Instructions Button

The button is prominently positioned at the top of the docs homepage, right after the hero section. When clicked, it copies the complete contents of pkg/cli/templates/instructions.md to the clipboard and shows "✓ Copied!" feedback to confirm the action was successful. The button integrates seamlessly with the Starlight theme using the accent blue color.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/githubnext/gh-aw/releases
    • Triggering command: node /home/REDACTED/work/gh-aw/gh-aw/docs/node_modules/.bin/astro dev (http block)
  • telemetry.astro.build
    • Triggering command: node /home/REDACTED/work/gh-aw/gh-aw/docs/node_modules/.bin/astro dev (dns block)
    • Triggering command: node /home/REDACTED/work/gh-aw/gh-aw/docs/node_modules/.bin/astro build (dns block)
    • Triggering command: node /home/REDACTED/work/gh-aw/gh-aw/docs/node_modules/.bin/astro preview (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@pelikhan
Copy link
Copy Markdown
Collaborator

can you move this button

@pelikhan pelikhan closed this Sep 19, 2025
@pelikhan pelikhan deleted the copilot/fix-55ab6769-0448-40ad-b82b-e43677b008b6 branch September 19, 2025 05:47
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.

2 participants