Skip to content

feat(docs): Add PromptCode Astro component for rendering workflow prompts#17556

Closed
Copilot wants to merge 2 commits intomainfrom
copilot/create-astro-starlight-component
Closed

feat(docs): Add PromptCode Astro component for rendering workflow prompts#17556
Copilot wants to merge 2 commits intomainfrom
copilot/create-astro-starlight-component

Conversation

Copy link
Contributor

Copilot AI commented Feb 21, 2026

Introduces a reusable Starlight component that renders a markdown prompt file inside a code block, automatically prepending the common "Create an agentic workflow using the address …" sentence. The component is used on the Creating Workflows page to load an issue-triage prompt.

Changes

  • docs/src/components/PromptCode.astro — New component. Reads a markdown file from docs/src/ at build time, prepends the common first sentence (injected by the component, not stored in the file), and renders via Starlight's <Code> with word-wrap. Accepts src, address, and optional title props.

  • docs/src/prompts/issue-triage.md — Prompt body for an issue-triage workflow (classification, labeling, triage comment, assignment). No frontmatter; pure prompt text.

  • docs/src/content/docs/setup/creating-workflows.mdx — Replaces the hard-coded code fence in the "GitHub Web Interface" section with <PromptCode>.

Usage

import PromptCode from '../../../components/PromptCode.astro';

<PromptCode
  src="prompts/issue-triage.md"
  address="https://raw.githubusercontent.com/github/gh-aw/main/create.md"
/>

Renders as:

Create an agentic workflow using the address https://raw.githubusercontent.com/github/gh-aw/main/create.md

The purpose of the workflow is to triage new GitHub issues.
…

The src prop is resolved relative to docs/src/ using process.cwd() at build time, which is the Astro project root.

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:

  • telemetry.astro.build
    • Triggering command: /opt/hostedtoolcache/node/24.13.0/x64/bin/node node node_modules/.bin/astro build (dns block)
    • Triggering command: /opt/hostedtoolcache/node/24.13.0/x64/bin/node node node_modules/.bin/astro preview --port 4321 (dns block)

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

Original prompt

Create an Astro Starlight component for the documentation that renders a markdown file inside a code region. The markdown file should live somewhere within the documentation tree.

Use this component on the “Creating Workflows” page to load the first prompt for creating an issue-triage workflow.

The component must prepend a first sentence:

“Create an agentic workflow using the address …”

This sentence is common to all such prompts and must be added by the component itself, not included in the markdown file.

Also create a markdown file that contains the issue-triage prompt.

The goal of this component is to render a prompt that will generate an ejected workflow, with all necessary links included in the prompt so the user can run it end-to-end.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

- Add docs/src/components/PromptCode.astro: reads a markdown prompt
  file at build time and renders it in a code block prepended with
  "Create an agentic workflow using the address <url>"
- Add docs/src/prompts/issue-triage.md: issue-triage workflow prompt body
- Update creating-workflows.mdx: replace hard-coded first code block
  with <PromptCode> component using the issue-triage prompt

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Create Astro Starlight component for markdown rendering feat(docs): Add PromptCode Astro component for rendering workflow prompts Feb 21, 2026
@pelikhan pelikhan closed this Feb 21, 2026
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