diff --git a/docs/src/components/CopyInstructionsButton.astro b/docs/src/components/CopyInstructionsButton.astro new file mode 100644 index 00000000000..051fd2bd81c --- /dev/null +++ b/docs/src/components/CopyInstructionsButton.astro @@ -0,0 +1,116 @@ +--- +import fs from 'fs'; +import path from 'path'; + +// Read the instructions.md content at build time +const instructionsPath = path.join(process.cwd(), '..', 'pkg', 'cli', 'templates', 'instructions.md'); +let instructionsContent = ''; + +try { + instructionsContent = fs.readFileSync(instructionsPath, 'utf-8'); +} catch (error) { + console.warn('Could not read instructions.md:', error.message); + instructionsContent = 'Error: Could not load instructions content'; +} +--- + +
+ +
+ + + + \ No newline at end of file diff --git a/docs/src/content/docs/index.mdx b/docs/src/content/docs/index.mdx index 177482f82b8..e08131b19e4 100644 --- a/docs/src/content/docs/index.mdx +++ b/docs/src/content/docs/index.mdx @@ -15,6 +15,9 @@ hero: --- import { Card, CardGrid } from '@astrojs/starlight/components'; +import CopyInstructionsButton from '../../components/CopyInstructionsButton.astro'; + + ## ✨ AI-Powered Repository Automation