Skip to content
Prev Previous commit
Next Next commit
Fix links on readme
  • Loading branch information
BrunoQuaresma committed May 26, 2022
commit 792ee737c3ee63a4b75733845ec426e458c98766
12 changes: 11 additions & 1 deletion site/src/pages/TemplatePage/TemplatePageView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,17 @@ export const TemplatePageView: React.FC<TemplatePageViewProps> = ({
</WorkspaceSection>
<WorkspaceSection title="README" contentsProps={{ className: styles.readmeContents }}>
<div className={styles.markdownWrapper}>
<ReactMarkdown>{activeTemplateVersion.readme}</ReactMarkdown>
<ReactMarkdown
components={{
a: ({ href, target, children }) => (
<Link href={href} target={target}>
{children}
</Link>
),
}}
>
{activeTemplateVersion.readme}
</ReactMarkdown>
</div>
</WorkspaceSection>
</Stack>
Expand Down
2 changes: 1 addition & 1 deletion site/src/testHelpers/entities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export const MockTemplateVersion: TypesGen.TemplateVersion = {
updated_at: "",
job: MockProvisionerJob,
name: "test-version",
readme: "## Instructions\nYou can add instructions here",
readme: "## Instructions\nYou can add instructions here\n\n[Some link info](https://coder.com)",
}

export const MockTemplate: TypesGen.Template = {
Expand Down