|
|
@ -27,7 +27,6 @@ const readData = async (...args: string[]): Promise<string> => { |
|
|
|
if (e instanceof Deno.errors.NotFound) { |
|
|
|
return ""; |
|
|
|
} |
|
|
|
|
|
|
|
throw e; |
|
|
|
} |
|
|
|
}; |
|
|
@ -43,7 +42,11 @@ const renderItem = ( |
|
|
|
(website === "" ? "" : `* [Website](${website})\n`) + |
|
|
|
(github === "" |
|
|
|
? "" |
|
|
|
: `* [Repository](https://github.com/${github})     \n`) + |
|
|
|
: `* [Repository](https://github.com/${github})  ` + |
|
|
|
` ` + |
|
|
|
` ` + |
|
|
|
` ` + |
|
|
|
`\n`) + |
|
|
|
`* [Demo](${demo})\n\n${screenshotMarkdown}`; |
|
|
|
}; |
|
|
|
|
|
|
@ -78,7 +81,10 @@ try { |
|
|
|
sections[sectionDir] = items.map(renderItem).join("\n\n\n"); |
|
|
|
} |
|
|
|
|
|
|
|
const template = (await Deno.readTextFile(readmeTemplateFile)).replace(/\n+$/, ""); |
|
|
|
const template = (await Deno.readTextFile(readmeTemplateFile)).replace( |
|
|
|
/\n+$/, |
|
|
|
"", |
|
|
|
); |
|
|
|
let readme = template; |
|
|
|
|
|
|
|
for (const [name, markup] of Object.entries(sections)) { |
|
|
|