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:
parent
ceb18c77db
commit
5d1e39b651
2 changed files with 7 additions and 1 deletions
|
|
@ -279,7 +279,7 @@ export function generateReadme(
|
||||||
lines.push("## Getting Started");
|
lines.push("## Getting Started");
|
||||||
lines.push("");
|
lines.push("");
|
||||||
lines.push("```bash");
|
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("");
|
lines.push("");
|
||||||
lines.push("See [Paperclip](https://paperclip.ing) for more information.");
|
lines.push("See [Paperclip](https://paperclip.ing) for more information.");
|
||||||
|
|
|
||||||
|
|
@ -341,6 +341,7 @@ function ExportPreviewPane({
|
||||||
}
|
}
|
||||||
|
|
||||||
const isMarkdown = selectedFile.endsWith(".md");
|
const isMarkdown = selectedFile.endsWith(".md");
|
||||||
|
const isSvg = selectedFile.endsWith(".svg");
|
||||||
const parsed = isMarkdown ? parseFrontmatter(content) : null;
|
const parsed = isMarkdown ? parseFrontmatter(content) : null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
@ -356,6 +357,11 @@ function ExportPreviewPane({
|
||||||
</>
|
</>
|
||||||
) : isMarkdown ? (
|
) : isMarkdown ? (
|
||||||
<MarkdownBody>{content}</MarkdownBody>
|
<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">
|
<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>
|
<code>{content}</code>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue