Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

feat: 11ty buildpack

Andras Bacsaifd95936219b3
diff --git a/src/lib/buildPacks/index.ts b/src/lib/buildPacks/index.ts
index 4cdbacccef..41a7655f9a 100644
--- a/src/lib/buildPacks/index.ts
+++ b/src/lib/buildPacks/index.ts
@@ -11,6 +11,7 @@ import vuejs from './vuejs';
import php from './php';
import rust from './rust';
import astro from './static';
+import eleventy from './static';
export {
node,
@@ -25,5 +26,6 @@ export {
vuejs,
php,
rust,
- astro
+ astro,
+ eleventy
};
diff --git a/src/lib/components/templates.ts b/src/lib/components/templates.ts
index 56b72a250f..46998ab107 100644
--- a/src/lib/components/templates.ts
+++ b/src/lib/components/templates.ts
@@ -136,6 +136,16 @@ export function findBuildPack(pack, packageManager = 'npm') {
port: 80
};
}
+ if (pack === 'eleventy') {
+ return {
+ ...metaData,
+ installCommand: `yarn install`,
+ buildCommand: `yarn build`,
+ startCommand: null,
+ publishDirectory: `_site`,
+ port: 80
+ };
+ }
return {
name: 'node',
fancyName: 'Node.js',
@@ -191,6 +201,12 @@ export const buildPacks = [
hoverColor: 'hover:bg-green-700',
color: 'bg-green-700'
},
+ {
+ name: 'gatsby',
+ fancyName: 'Gatsby',
+ hoverColor: 'hover:bg-blue-700',
+ color: 'bg-blue-700'
+ },
{
name: 'astro',
fancyName: 'Astro',
@@ -198,11 +214,12 @@ export const buildPacks = [
color: 'bg-pink-700'
},
{
- name: 'gatsby',
- fancyName: 'Gatsby',
- hoverColor: 'hover:bg-blue-700',
- color: 'bg-blue-700'
+ name: 'eleventy',
+ fancyName: 'Eleventy',
+ hoverColor: 'hover:bg-red-700',
+ color: 'bg-red-700'
},
+
{
name: 'react',
fancyName: 'React',
@@ -215,18 +232,18 @@ export const buildPacks = [
hoverColor: 'hover:bg-blue-700',
color: 'bg-blue-700'
},
- {
- name: 'nestjs',
- fancyName: 'NestJS',
- hoverColor: 'hover:bg-red-700',
- color: 'bg-red-700'
- },
{
name: 'nextjs',
fancyName: 'NextJS',
hoverColor: 'hover:bg-blue-700',
color: 'bg-blue-700'
},
+ {
+ name: 'nestjs',
+ fancyName: 'NestJS',
+ hoverColor: 'hover:bg-red-700',
+ color: 'bg-red-700'
+ },
{
name: 'rust',
fancyName: 'Rust',
@@ -238,6 +255,9 @@ export const scanningTemplates = {
astro: {
buildPack: 'astro'
},
+ '@11ty/eleventy': {
+ buildPack: 'eleventy'
+ },
svelte: {
buildPack: 'svelte'
},
diff --git a/src/routes/applications/[id]/configuration/buildpack.svelte b/src/routes/applications/[id]/configuration/buildpack.svelte
index 7bed31e066..d1612ea492 100644
--- a/src/routes/applications/[id]/configuration/buildpack.svelte
+++ b/src/routes/applications/[id]/configuration/buildpack.svelte
@@ -37,6 +37,8 @@
import { gitTokens } from '$lib/store';
import { browser } from '$app/env';
+ const { id } = $page.params;
+
let scanning = true;
let foundConfig = null;
let packageManager = 'npm';
@@ -176,6 +178,8 @@
}
}
if (error.message === 'Bad credentials') {
+ const { token } = await get(`/applications/${id}/configuration/githubToken.json`);
+ $gitTokens.githubToken = token;
browser && window.location.reload();
}
return errorNotification(error);