File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ title: Tile of the snippet
1616description: description of the snippet
1717pubDate: (Dare) Feb 20, 2022
1818contributedBy: "@TwitterHandle "
19+ repoUrl: "@GithubRepo "
1920---
2021
2122import BlogImage from " @components/BlogImage.astro" ;
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ export interface Props {
1010 description? : string ;
1111 image? : string ;
1212 ImageAlt? : string ;
13+ githubRepoUrl? : string ;
1314}
1415
1516const thisDate = new Date (pubDate ).toLocaleDateString (" en" , {
@@ -93,9 +94,10 @@ const canonicalURL = new URL(Astro.url).href;
9394 <time datetime ={ frontmatter .pubDate } class =" mb-3 sm:mb-0" >
9495 { thisDate }
9596 </time >
96- <time datetime = { frontmatter . contributedBy } class =" mb-3 sm:mb-0" >
97+ <span class =" mb-3 sm:mb-0" >
9798 { frontmatter .contributedBy }
98- </time >
99+ </span >
100+ { frontmatter .repoUrl && <a href = { frontmatter .repoUrl } target = " _blank" class = " dark:text-blue-400 text-blue-600 mb-3 sm:mb-0" >Open Repo</a >}
99101 </nav >
100102 </header >
101103 <article >
You can’t perform that action at this time.
0 commit comments