Skip to content

Commit 792ee73

Browse files
committed
Fix links on readme
1 parent fac8e3e commit 792ee73

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

site/src/pages/TemplatePage/TemplatePageView.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,17 @@ export const TemplatePageView: React.FC<TemplatePageViewProps> = ({
6262
</WorkspaceSection>
6363
<WorkspaceSection title="README" contentsProps={{ className: styles.readmeContents }}>
6464
<div className={styles.markdownWrapper}>
65-
<ReactMarkdown>{activeTemplateVersion.readme}</ReactMarkdown>
65+
<ReactMarkdown
66+
components={{
67+
a: ({ href, target, children }) => (
68+
<Link href={href} target={target}>
69+
{children}
70+
</Link>
71+
),
72+
}}
73+
>
74+
{activeTemplateVersion.readme}
75+
</ReactMarkdown>
6676
</div>
6777
</WorkspaceSection>
6878
</Stack>

site/src/testHelpers/entities.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export const MockTemplateVersion: TypesGen.TemplateVersion = {
8888
updated_at: "",
8989
job: MockProvisionerJob,
9090
name: "test-version",
91-
readme: "## Instructions\nYou can add instructions here",
91+
readme: "## Instructions\nYou can add instructions here\n\n[Some link info](https://coder.com)",
9292
}
9393

9494
export const MockTemplate: TypesGen.Template = {

0 commit comments

Comments
 (0)