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'; +} +--- + +