diff --git a/.github/scripts/readme-generator.ts b/.github/scripts/readme-generator.ts index a8b1eade..e84d22fe 100644 --- a/.github/scripts/readme-generator.ts +++ b/.github/scripts/readme-generator.ts @@ -43,12 +43,13 @@ const appToReadme = async (app: App) => { return `| | [${app.name}](${app.source}) | ${app.description} | ${app.port} |`; }; -const writeToReadme = (appsList: string) => { +const writeToReadme = (appsList: string, count: number) => { const baseReadme = fs.readFileSync( __dirname + "/../../templates/README.md", "utf8" ); - const finalReadme = baseReadme.replace("", appsList); + let finalReadme = baseReadme.replace("", appsList); + finalReadme = finalReadme.replace("", count.toString()); fs.writeFileSync(__dirname + "/../../README.md", finalReadme); }; @@ -62,7 +63,7 @@ const main = async () => { appsList = appsList + (appFinal + "\n"); } - writeToReadme(appsList); + writeToReadme(appsList, appKeys.length); exec( `npx prettier ${__dirname + "/../../README.md"} --write`, (stdout, stderr) => { diff --git a/templates/README.md b/templates/README.md index d73b8617..6f276dec 100644 --- a/templates/README.md +++ b/templates/README.md @@ -10,7 +10,7 @@ If you want to see new apps on Tipi you can either: - [Join the Discord](https://discord.gg/Bu9qEPnHsc) members of the community will add it. - Fork this repo and create the necessary files for a Tipi app. Follow this [guide](https://www.runtipi.io/docs/contributing/adding-a-new-app)` -## Apps available +## Apps available () | Icon | Name | Description | Port | | ---- | ---- | ----------- | ---- |