diff --git a/website/docs/docusaurus.config.esm.mjs b/website/docs/docusaurus.config.esm.mjs index 76b9723f5b..e353e7a227 100644 --- a/website/docs/docusaurus.config.esm.mjs +++ b/website/docs/docusaurus.config.esm.mjs @@ -9,7 +9,7 @@ */ import { cp } from "node:fs/promises"; -import { basename, resolve } from "node:path"; +import { resolve } from "node:path"; import { fileURLToPath } from "node:url"; import { createDocusaurusConfig } from "@goauthentik/docusaurus-config"; @@ -33,16 +33,22 @@ const releaseEnvironment = prepareReleaseEnvironment(); //#region Copy static files -const files = [ - // --- - resolve(authentikModulePath, "lifecycle/container/compose.yml"), -]; +const brandFiles = new Map([ + [resolve(authentikModulePath, "lifecycle/container/compose.yml"), "compose.yml"], + ["@goauthentik/brand-assets/icon.png", "img/icon.png"], + ["@goauthentik/brand-assets/icon.svg", "img/icon.svg"], + ["@goauthentik/brand-assets/social.png", "img/social.png"], + ["@goauthentik/brand-assets/icon_left_brand.svg", "img/icon_left_brand_colour.svg"], + ["@goauthentik/brand-assets/icon_left_brand_white.svg", "img/icon_left_brand.svg"], + ["@goauthentik/brand-assets/icon_top_brand.svg", "img/icon_top_brand_colour.svg"], + ["@goauthentik/brand-assets/icon_top_brand_white.svg", "img/icon_top_brand.svg"], +]); await Promise.all( - files.map((file) => { - const fileName = basename(file); - const destPath = resolve(rootStaticDirectory, fileName); - return cp(file, destPath, { recursive: true }); + Array.from(brandFiles.entries(), async ([src, dest]) => { + const srcPath = require.resolve(src); + const destPath = resolve(rootStaticDirectory, dest); + return cp(srcPath, destPath, { recursive: true }); }), ); diff --git a/website/package-lock.json b/website/package-lock.json index 5c29b2cf00..5cf418c3ad 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -17,6 +17,7 @@ ], "dependencies": { "@eslint/js": "^9.39.3", + "@goauthentik/brand-assets": "^2.0.0", "@goauthentik/eslint-config": "../packages/eslint-config", "@goauthentik/prettier-config": "../packages/prettier-config", "@goauthentik/tsconfig": "../packages/tsconfig", @@ -4759,6 +4760,12 @@ "resolved": "api", "link": true }, + "node_modules/@goauthentik/brand-assets": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@goauthentik/brand-assets/-/brand-assets-2.0.0.tgz", + "integrity": "sha512-yRJrV+KuGrz7MNcRzAkZa4e7LuciuFZBVSyPFRd/EndxgiqcFuFHyn+6tEurKNmianBNURhe2qm5ytoLFgEWFQ==", + "license": "UNLICENSED" + }, "node_modules/@goauthentik/docs-topics": { "resolved": "docs", "link": true diff --git a/website/package.json b/website/package.json index f6e27e727c..3df715d4cf 100644 --- a/website/package.json +++ b/website/package.json @@ -20,6 +20,7 @@ }, "dependencies": { "@eslint/js": "^9.39.3", + "@goauthentik/brand-assets": "^2.0.0", "@goauthentik/eslint-config": "../packages/eslint-config", "@goauthentik/prettier-config": "../packages/prettier-config", "@goauthentik/tsconfig": "../packages/tsconfig", diff --git a/website/static/img/.gitignore b/website/static/img/.gitignore new file mode 100644 index 0000000000..8b7b42a590 --- /dev/null +++ b/website/static/img/.gitignore @@ -0,0 +1,7 @@ +icon.png +icon.svg +icon_left_brand.svg +icon_left_brand_colour.svg +icon_top_brand.svg +icon_top_brand_colour.svg +social.png diff --git a/website/static/img/icon.png b/website/static/img/icon.png deleted file mode 100644 index 8165cae90b..0000000000 Binary files a/website/static/img/icon.png and /dev/null differ diff --git a/website/static/img/icon.svg b/website/static/img/icon.svg deleted file mode 100644 index 00b685c98b..0000000000 --- a/website/static/img/icon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/website/static/img/icon_left_brand.svg b/website/static/img/icon_left_brand.svg deleted file mode 100644 index 91ca4d9881..0000000000 --- a/website/static/img/icon_left_brand.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/website/static/img/icon_left_brand_colour.svg b/website/static/img/icon_left_brand_colour.svg deleted file mode 100644 index 189501f137..0000000000 --- a/website/static/img/icon_left_brand_colour.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/website/static/img/icon_top_brand.svg b/website/static/img/icon_top_brand.svg deleted file mode 100644 index 83f2c3b6a9..0000000000 --- a/website/static/img/icon_top_brand.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/website/static/img/icon_top_brand_colour.svg b/website/static/img/icon_top_brand_colour.svg deleted file mode 100644 index 4376998381..0000000000 --- a/website/static/img/icon_top_brand_colour.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/website/static/img/social.png b/website/static/img/social.png deleted file mode 100644 index e346d45dd8..0000000000 Binary files a/website/static/img/social.png and /dev/null differ