diff --git a/app/config/frameworks.php b/app/config/frameworks.php index cc9e913523..e669d57710 100644 --- a/app/config/frameworks.php +++ b/app/config/frameworks.php @@ -30,14 +30,14 @@ return [ 'buildCommand' => 'npm run build', 'installCommand' => 'npm install', 'outputDirectory' => './dist/analog', - 'startCommand' => 'sh helpers/analog/server.sh', + 'startCommand' => 'bash helpers/analog/server.sh', ], 'static' => [ 'key' => 'static', 'buildCommand' => 'npm run build', 'installCommand' => 'npm install', 'outputDirectory' => './dist/analog/public', - 'startCommand' => 'sh helpers/server.sh', + 'startCommand' => 'bash helpers/server.sh', 'fallbackFile' => 'index.html' ] ] @@ -56,14 +56,14 @@ return [ 'buildCommand' => 'npm run build', 'installCommand' => 'npm install', 'outputDirectory' => './dist/angular', - 'startCommand' => 'sh helpers/angular/server.sh', + 'startCommand' => 'bash helpers/angular/server.sh', ], 'static' => [ 'key' => 'static', 'buildCommand' => 'npm run build', 'installCommand' => 'npm install', 'outputDirectory' => './dist/angular/browser', - 'startCommand' => 'sh helpers/server.sh', + 'startCommand' => 'bash helpers/server.sh', 'fallbackFile' => 'index.csr.html' ] ] @@ -82,14 +82,14 @@ return [ 'buildCommand' => 'npm run build', 'installCommand' => 'npm install', 'outputDirectory' => './.next', - 'startCommand' => 'sh helpers/next-js/server.sh', + 'startCommand' => 'bash helpers/next-js/server.sh', ], 'static' => [ 'key' => 'static', 'buildCommand' => 'npm run build', 'installCommand' => 'npm install', 'outputDirectory' => './out', - 'startCommand' => 'sh helpers/server.sh', + 'startCommand' => 'bash helpers/server.sh', ] ] ], @@ -105,7 +105,7 @@ return [ 'buildCommand' => 'npm run build', 'installCommand' => 'npm install', 'outputDirectory' => './dist', - 'startCommand' => 'sh helpers/server.sh', + 'startCommand' => 'bash helpers/server.sh', 'fallbackFile' => 'index.html' ] ] @@ -124,14 +124,14 @@ return [ 'buildCommand' => 'npm run build', 'installCommand' => 'npm install', 'outputDirectory' => './.output', - 'startCommand' => 'sh helpers/nuxt/server.sh', + 'startCommand' => 'bash helpers/nuxt/server.sh', ], 'static' => [ 'key' => 'static', 'buildCommand' => 'npm run generate', 'installCommand' => 'npm install', 'outputDirectory' => './output/public', - 'startCommand' => 'sh helpers/server.sh', + 'startCommand' => 'bash helpers/server.sh', ] ] ], @@ -147,7 +147,7 @@ return [ 'buildCommand' => 'npm run build', 'installCommand' => 'npm install', 'outputDirectory' => './dist', - 'startCommand' => 'sh helpers/server.sh', + 'startCommand' => 'bash helpers/server.sh', 'fallbackFile' => 'index.html' ] ] @@ -166,14 +166,14 @@ return [ 'buildCommand' => 'npm run build', 'installCommand' => 'npm install', 'outputDirectory' => './build', - 'startCommand' => 'sh helpers/sveltekit/server.sh', + 'startCommand' => 'bash helpers/sveltekit/server.sh', ], 'static' => [ 'key' => 'static', 'buildCommand' => 'npm run build', 'installCommand' => 'npm install', 'outputDirectory' => './build', - 'startCommand' => 'sh helpers/server.sh', + 'startCommand' => 'bash helpers/server.sh', ] ] ], @@ -191,14 +191,14 @@ return [ 'buildCommand' => 'npm run build', 'installCommand' => 'npm install', 'outputDirectory' => './dist', - 'startCommand' => 'sh helpers/astro/server.sh', + 'startCommand' => 'bash helpers/astro/server.sh', ], 'static' => [ 'key' => 'static', 'buildCommand' => 'npm run build', 'installCommand' => 'npm install', 'outputDirectory' => './dist', - 'startCommand' => 'sh helpers/server.sh', + 'startCommand' => 'bash helpers/server.sh', ] ] ], @@ -216,14 +216,14 @@ return [ 'buildCommand' => 'npm run build', 'installCommand' => 'npm install', 'outputDirectory' => './build', - 'startCommand' => 'sh helpers/remix/server.sh', + 'startCommand' => 'bash helpers/remix/server.sh', ], 'static' => [ 'key' => 'static', 'buildCommand' => 'npm run build', 'installCommand' => 'npm install', 'outputDirectory' => './build/client', - 'startCommand' => 'sh helpers/server.sh', + 'startCommand' => 'bash helpers/server.sh', ] ] ], @@ -239,7 +239,7 @@ return [ 'buildCommand' => 'flutter build web', 'installCommand' => '', 'outputDirectory' => './build/web', - 'startCommand' => 'sh helpers/server.sh', + 'startCommand' => 'bash helpers/server.sh', ], ], ], @@ -255,7 +255,7 @@ return [ 'buildCommand' => 'npm run build', 'installCommand' => 'npm install', 'outputDirectory' => './dist', - 'startCommand' => 'sh helpers/server.sh', + 'startCommand' => 'bash helpers/server.sh', ], ] ], @@ -271,7 +271,7 @@ return [ 'buildCommand' => '', 'installCommand' => '', 'outputDirectory' => './', - 'startCommand' => 'sh helpers/server.sh', + 'startCommand' => 'bash helpers/server.sh', ], ] ], diff --git a/app/config/templates/site.php b/app/config/templates/site.php index 1130d55fcf..10cd54b859 100644 --- a/app/config/templates/site.php +++ b/app/config/templates/site.php @@ -16,6 +16,16 @@ if (System::getEnv('_APP_ENV') === 'development') { $url = $protocol . '://' . $hostname; +class UseCases +{ + public const PORTFOLIO = 'portfolio'; + public const STARTER = 'starter'; + public const EVENTS = 'events'; + public const ECOMMERCE = 'ecommerce'; + public const DOCUMENTATION = 'documentation'; + public const BLOG = 'blog'; +} + const TEMPLATE_FRAMEWORKS = [ 'SVELTEKIT' => [ 'key' => 'sveltekit', @@ -143,10 +153,73 @@ function getFramework(string $frameworkEnum, array $overrides) } return [ + [ + 'key' => 'vitepress', + 'name' => 'Vitepress', + 'useCases' => [UseCases::DOCUMENTATION], + 'screenshotDark' => $url . '/images/sites/templates/vitepress-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/vitepress-light.png', + 'frameworks' => [ + getFramework('VITE', [ + 'providerRootDirectory' => './vite/vitepress', + 'outputDirectory' => '404.html', + 'installCommand' => 'npm i vitepress && npm install', + 'buildCommand' => 'npm run docs:build', + 'outputDirectory' => './.vitepress/dist', + ]), + ], + 'vcsProvider' => 'github', + 'providerRepositoryId' => 'templates-for-sites', + 'providerOwner' => 'appwrite', + 'providerVersion' => '0.3.*', + 'variables' => [] + ], + [ + 'key' => 'vuepress', + 'name' => 'Vuepress', + 'useCases' => [UseCases::DOCUMENTATION], + 'screenshotDark' => $url . '/images/sites/templates/vuepress-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/vuepress-light.png', + 'frameworks' => [ + getFramework('VUE', [ + 'providerRootDirectory' => './vue/vuepress', + 'outputDirectory' => '404.html', + 'installCommand' => 'npm install', + 'buildCommand' => 'npm run build', + 'outputDirectory' => './src/.vuepress/dist', + ]), + ], + 'vcsProvider' => 'github', + 'providerRepositoryId' => 'templates-for-sites', + 'providerOwner' => 'appwrite', + 'providerVersion' => '0.3.*', + 'variables' => [] + ], + [ + 'key' => 'docusaurus', + 'name' => 'Docusaurus', + 'useCases' => [UseCases::DOCUMENTATION], + 'screenshotDark' => $url . '/images/sites/templates/docusaurus-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/docusaurus-light.png', + 'frameworks' => [ + getFramework('REACT', [ + 'providerRootDirectory' => './react/docusaurus', + 'outputDirectory' => '404.html', + 'installCommand' => 'npm install', + 'buildCommand' => 'npm run build', + 'outputDirectory' => './build', + ]), + ], + 'vcsProvider' => 'github', + 'providerRepositoryId' => 'templates-for-sites', + 'providerOwner' => 'appwrite', + 'providerVersion' => '0.3.*', + 'variables' => [] + ], [ 'key' => 'nxt-lnk', 'name' => 'Nxt Lnk', - 'useCases' => ['portfolio'], + 'useCases' => [UseCases::PORTFOLIO], 'screenshotDark' => $url . '/images/sites/templates/nxt-lnk-dark.png', 'screenshotLight' => $url . '/images/sites/templates/nxt-lnk-light.png', 'frameworks' => [ @@ -160,11 +233,10 @@ return [ 'providerVersion' => '0.3.*', 'variables' => [] ], - [ 'key' => 'magic-portfolio', 'name' => 'Magic Portfolio', - 'useCases' => ['portfolio'], + 'useCases' => [UseCases::PORTFOLIO], 'screenshotDark' => $url . '/images/sites/templates/magic-portfolio-dark.png', 'screenshotLight' => $url . '/images/sites/templates/magic-portfolio-light.png', 'frameworks' => [ @@ -178,11 +250,10 @@ return [ 'providerVersion' => '0.3.*', 'variables' => [] ], - [ 'key' => 'littlelink', 'name' => 'LittleLink', - 'useCases' => ['portfolio'], + 'useCases' => [UseCases::PORTFOLIO], 'screenshotDark' => $url . '/images/sites/templates/littlelink-dark.png', 'screenshotLight' => $url . '/images/sites/templates/littlelink-light.png', 'frameworks' => [ @@ -196,11 +267,10 @@ return [ 'providerVersion' => '0.3.*', 'variables' => [] ], - [ 'key' => 'logspot', 'name' => 'Logspot', - 'useCases' => ['blog'], + 'useCases' => [UseCases::BLOG], 'screenshotDark' => $url . '/images/sites/templates/logspot-dark.png', 'screenshotLight' => $url . '/images/sites/templates/logspot-light.png', 'frameworks' => [ @@ -220,7 +290,7 @@ return [ [ 'key' => 'astro-nano', 'name' => 'Astro Nano', - 'useCases' => ['portfolio'], + 'useCases' => [UseCases::PORTFOLIO], 'screenshotDark' => $url . '/images/sites/templates/astro-nano-dark.png', 'screenshotLight' => $url . '/images/sites/templates/astro-nano-light.png', 'frameworks' => [ @@ -239,7 +309,7 @@ return [ [ 'key' => 'astro-starlight', 'name' => 'Astro Starlight', - 'useCases' => ['documentation'], + 'useCases' => [UseCases::DOCUMENTATION], 'screenshotDark' => $url . '/images/sites/templates/astro-starlight-dark.png', 'screenshotLight' => $url . '/images/sites/templates/astro-starlight-light.png', 'frameworks' => [ @@ -258,7 +328,7 @@ return [ [ 'key' => 'astro-sphere', 'name' => 'Astro Sphere', - 'useCases' => ['portfolio'], + 'useCases' => [UseCases::PORTFOLIO], 'screenshotDark' => $url . '/images/sites/templates/astro-sphere-dark.png', 'screenshotLight' => $url . '/images/sites/templates/astro-sphere-light.png', 'frameworks' => [ @@ -277,7 +347,7 @@ return [ [ 'key' => 'astro-starlog', 'name' => 'Astro Starlog', - 'useCases' => ['blog'], + 'useCases' => [UseCases::BLOG], 'screenshotDark' => $url . '/images/sites/templates/astro-starlog-dark.png', 'screenshotLight' => $url . '/images/sites/templates/astro-starlog-light.png', 'frameworks' => [ @@ -296,7 +366,7 @@ return [ [ 'key' => 'onelink', 'name' => 'Onelink', - 'useCases' => ['portfolio'], + 'useCases' => [UseCases::PORTFOLIO], 'screenshotDark' => $url . '/images/sites/templates/onelink-dark.png', 'screenshotLight' => $url . '/images/sites/templates/onelink-light.png', 'frameworks' => [ @@ -316,7 +386,7 @@ return [ [ 'key' => 'starter-for-flutter', 'name' => 'Flutter starter', - 'useCases' => ['starter'], + 'useCases' => [UseCases::STARTER], 'screenshotDark' => $url . '/images/sites/templates/starter-for-flutter-dark.png', 'screenshotLight' => $url . '/images/sites/templates/starter-for-flutter-light.png', 'frameworks' => [ @@ -359,7 +429,7 @@ return [ [ 'key' => 'starter-for-js', 'name' => 'JavaScript starter', - 'useCases' => ['starter'], + 'useCases' => [UseCases::STARTER], 'screenshotDark' => $url . '/images/sites/templates/starter-for-js-dark.png', 'screenshotLight' => $url . '/images/sites/templates/starter-for-js-light.png', 'frameworks' => [ @@ -401,7 +471,7 @@ return [ [ 'key' => 'starter-for-angular', 'name' => 'Angular starter', - 'useCases' => ['starter'], + 'useCases' => [UseCases::STARTER], 'screenshotDark' => $url . '/images/sites/templates/starter-for-angular-dark.png', 'screenshotLight' => $url . '/images/sites/templates/starter-for-angular-light.png', 'frameworks' => [ @@ -445,7 +515,7 @@ return [ [ 'key' => 'starter-for-svelte', 'name' => 'Svelte starter', - 'useCases' => ['starter'], + 'useCases' => [UseCases::STARTER], 'screenshotDark' => $url . '/images/sites/templates/starter-for-svelte-dark.png', 'screenshotLight' => $url . '/images/sites/templates/starter-for-svelte-light.png', 'frameworks' => [ @@ -487,7 +557,7 @@ return [ [ 'key' => 'starter-for-react', 'name' => 'React starter', - 'useCases' => ['starter'], + 'useCases' => [UseCases::STARTER], 'screenshotDark' => $url . '/images/sites/templates/starter-for-react-dark.png', 'screenshotLight' => $url . '/images/sites/templates/starter-for-react-light.png', 'frameworks' => [ @@ -529,7 +599,7 @@ return [ [ 'key' => 'starter-for-vue', 'name' => 'Vue starter', - 'useCases' => ['starter'], + 'useCases' => [UseCases::STARTER], 'screenshotDark' => $url . '/images/sites/templates/starter-for-vue-dark.png', 'screenshotLight' => $url . '/images/sites/templates/starter-for-vue-light.png', 'frameworks' => [ @@ -571,7 +641,7 @@ return [ [ 'key' => 'starter-for-react-native', 'name' => 'React Native starter', - 'useCases' => ['starter'], + 'useCases' => [UseCases::STARTER], 'screenshotDark' => $url . '/images/sites/templates/starter-for-react-native-dark.png', 'screenshotLight' => $url . '/images/sites/templates/starter-for-react-native-light.png', 'frameworks' => [ @@ -614,7 +684,7 @@ return [ [ 'key' => 'starter-for-nextjs', 'name' => 'Next.js starter', - 'useCases' => ['starter'], + 'useCases' => [UseCases::STARTER], 'screenshotDark' => $url . '/images/sites/templates/starter-for-nextjs-dark.png', 'screenshotLight' => $url . '/images/sites/templates/starter-for-nextjs-light.png', 'frameworks' => [ @@ -656,7 +726,7 @@ return [ [ 'key' => 'starter-for-nuxt', 'name' => 'Nuxt starter', - 'useCases' => ['starter'], + 'useCases' => [UseCases::STARTER], 'screenshotDark' => $url . '/images/sites/templates/starter-for-nuxt-dark.png', 'screenshotLight' => $url . '/images/sites/templates/starter-for-nuxt-light.png', 'frameworks' => [ @@ -698,7 +768,7 @@ return [ [ 'key' => 'template-for-event', 'name' => 'Event template', - 'useCases' => ['events'], + 'useCases' => [UseCases::EVENTS], 'screenshotDark' => $url . '/images/sites/templates/template-for-event-dark.png', 'screenshotLight' => $url . '/images/sites/templates/template-for-event-light.png', 'frameworks' => [ @@ -734,7 +804,7 @@ return [ [ 'key' => 'template-for-portfolio', 'name' => 'Portfolio template', - 'useCases' => ['portfolio'], + 'useCases' => [UseCases::PORTFOLIO], 'screenshotDark' => $url . '/images/sites/templates/template-for-portfolio-dark.png', 'screenshotLight' => $url . '/images/sites/templates/template-for-portfolio-light.png', 'frameworks' => [ @@ -751,7 +821,7 @@ return [ [ 'key' => 'template-for-store', 'name' => 'Store template', - 'useCases' => ['ecommerce'], + 'useCases' => [UseCases::ECOMMERCE], 'screenshotDark' => $url . '/images/sites/templates/template-for-store-dark.png', 'screenshotLight' => $url . '/images/sites/templates/template-for-store-light.png', 'frameworks' => [ @@ -793,7 +863,7 @@ return [ [ 'key' => 'template-for-blog', 'name' => 'Blog template', - 'useCases' => ['blog'], + 'useCases' => [UseCases::BLOG], 'screenshotDark' => $url . '/images/sites/templates/template-for-blog-dark.png', 'screenshotLight' => $url . '/images/sites/templates/template-for-blog-light.png', 'frameworks' => [ @@ -810,7 +880,7 @@ return [ [ 'key' => 'astro-starter', 'name' => 'Astro starter', - 'useCases' => ['starter'], + 'useCases' => [UseCases::STARTER], 'screenshotDark' => $url . '/images/sites/templates/astro-starter-dark.png', 'screenshotLight' => $url . '/images/sites/templates/astro-starter-light.png', 'frameworks' => [ @@ -827,7 +897,7 @@ return [ [ 'key' => 'remix-starter', 'name' => 'Remix starter', - 'useCases' => ['starter'], + 'useCases' => [UseCases::STARTER], 'screenshotDark' => $url . '/images/sites/templates/remix-starter-dark.png', 'screenshotLight' => $url . '/images/sites/templates/remix-starter-light.png', 'frameworks' => [ diff --git a/composer.lock b/composer.lock index aa9598eb05..56647bc670 100644 --- a/composer.lock +++ b/composer.lock @@ -2372,16 +2372,16 @@ }, { "name": "ramsey/collection", - "version": "2.1.0", + "version": "2.1.1", "source": { "type": "git", "url": "https://github.com/ramsey/collection.git", - "reference": "3c5990b8a5e0b79cd1cf11c2dc1229e58e93f109" + "reference": "344572933ad0181accbf4ba763e85a0306a8c5e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/collection/zipball/3c5990b8a5e0b79cd1cf11c2dc1229e58e93f109", - "reference": "3c5990b8a5e0b79cd1cf11c2dc1229e58e93f109", + "url": "https://api.github.com/repos/ramsey/collection/zipball/344572933ad0181accbf4ba763e85a0306a8c5e2", + "reference": "344572933ad0181accbf4ba763e85a0306a8c5e2", "shasum": "" }, "require": { @@ -2442,9 +2442,9 @@ ], "support": { "issues": "https://github.com/ramsey/collection/issues", - "source": "https://github.com/ramsey/collection/tree/2.1.0" + "source": "https://github.com/ramsey/collection/tree/2.1.1" }, - "time": "2025-03-02T04:48:29+00:00" + "time": "2025-03-22T05:38:12+00:00" }, { "name": "ramsey/uuid", @@ -5089,16 +5089,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "0.40.9", + "version": "0.40.10", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "dbb45a5db22cdc3368fe2573c07ba6088f188fa4" + "reference": "054ac96285caf4f77879087b2416a5ddb8263051" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/dbb45a5db22cdc3368fe2573c07ba6088f188fa4", - "reference": "dbb45a5db22cdc3368fe2573c07ba6088f188fa4", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/054ac96285caf4f77879087b2416a5ddb8263051", + "reference": "054ac96285caf4f77879087b2416a5ddb8263051", "shasum": "" }, "require": { @@ -5134,9 +5134,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/0.40.9" + "source": "https://github.com/appwrite/sdk-generator/tree/0.40.10" }, - "time": "2025-03-17T18:39:14+00:00" + "time": "2025-03-25T13:44:16+00:00" }, { "name": "doctrine/annotations", diff --git a/public/images/sites/templates/docusaurus-dark.png b/public/images/sites/templates/docusaurus-dark.png new file mode 100644 index 0000000000..916ce071ec Binary files /dev/null and b/public/images/sites/templates/docusaurus-dark.png differ diff --git a/public/images/sites/templates/docusaurus-light.png b/public/images/sites/templates/docusaurus-light.png new file mode 100644 index 0000000000..916ce071ec Binary files /dev/null and b/public/images/sites/templates/docusaurus-light.png differ diff --git a/public/images/sites/templates/vitepress-dark.png b/public/images/sites/templates/vitepress-dark.png new file mode 100644 index 0000000000..0c68d27461 Binary files /dev/null and b/public/images/sites/templates/vitepress-dark.png differ diff --git a/public/images/sites/templates/vitepress-light.png b/public/images/sites/templates/vitepress-light.png new file mode 100644 index 0000000000..0f93de1c10 Binary files /dev/null and b/public/images/sites/templates/vitepress-light.png differ diff --git a/public/images/sites/templates/vuepress-dark.png b/public/images/sites/templates/vuepress-dark.png new file mode 100644 index 0000000000..52896878be Binary files /dev/null and b/public/images/sites/templates/vuepress-dark.png differ diff --git a/public/images/sites/templates/vuepress-light.png b/public/images/sites/templates/vuepress-light.png new file mode 100644 index 0000000000..52896878be Binary files /dev/null and b/public/images/sites/templates/vuepress-light.png differ