fix: SVG preview in export page and update getting-started command
- Add inline SVG rendering for .svg files in ExportPreviewPane - Update Getting Started to use simpler `company import` syntax Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -279,7 +279,7 @@ export function generateReadme(
|
||||
lines.push("## Getting Started");
|
||||
lines.push("");
|
||||
lines.push("```bash");
|
||||
lines.push("pnpm paperclipai company import --from ./ --target new --include company,agents");
|
||||
lines.push("pnpm paperclipai company import this-github-url-or-folder");
|
||||
lines.push("```");
|
||||
lines.push("");
|
||||
lines.push("See [Paperclip](https://paperclip.ing) for more information.");
|
||||
|
||||
@@ -341,6 +341,7 @@ function ExportPreviewPane({
|
||||
}
|
||||
|
||||
const isMarkdown = selectedFile.endsWith(".md");
|
||||
const isSvg = selectedFile.endsWith(".svg");
|
||||
const parsed = isMarkdown ? parseFrontmatter(content) : null;
|
||||
|
||||
return (
|
||||
@@ -356,6 +357,11 @@ function ExportPreviewPane({
|
||||
</>
|
||||
) : isMarkdown ? (
|
||||
<MarkdownBody>{content}</MarkdownBody>
|
||||
) : isSvg ? (
|
||||
<div
|
||||
className="flex justify-center overflow-auto rounded-lg border border-border bg-white p-4"
|
||||
dangerouslySetInnerHTML={{ __html: content }}
|
||||
/>
|
||||
) : (
|
||||
<pre className="overflow-x-auto whitespace-pre-wrap break-words border-0 bg-transparent p-0 font-mono text-sm text-foreground">
|
||||
<code>{content}</code>
|
||||
|
||||
Reference in New Issue
Block a user