From 69da442fe012b8b70e6a8df930e00a4afcee16b1 Mon Sep 17 00:00:00 2001 From: svemagie <869694+svemagie@users.noreply.github.com> Date: Sun, 8 Mar 2026 06:49:12 +0100 Subject: [PATCH] Add repo-managed static CV data fallbacks --- _data/cv.js | 5 +++++ _data/cvPageConfig.js | 5 +++++ _data/cvPageConfigStatic.js | 6 ++++++ _data/cvStatic.js | 16 ++++++++++++++++ theme/_data/cv.js | 5 +++++ theme/_data/cvPageConfig.js | 5 +++++ theme/_data/cvPageConfigStatic.js | 6 ++++++ theme/_data/cvStatic.js | 16 ++++++++++++++++ 8 files changed, 64 insertions(+) create mode 100644 _data/cvPageConfigStatic.js create mode 100644 _data/cvStatic.js create mode 100644 theme/_data/cvPageConfigStatic.js create mode 100644 theme/_data/cvStatic.js diff --git a/_data/cv.js b/_data/cv.js index ec78d39..10f0e8e 100644 --- a/_data/cv.js +++ b/_data/cv.js @@ -12,6 +12,7 @@ import EleventyFetch from "@11ty/eleventy-fetch"; import { readFileSync } from "node:fs"; import { resolve, dirname } from "node:path"; import { fileURLToPath } from "node:url"; +import cvStatic from "./cvStatic.js"; const __dirname = dirname(fileURLToPath(import.meta.url)); const INDIEKIT_URL = @@ -75,5 +76,9 @@ export default async function () { return { ...EMPTY_CV, ...localData }; } + if (cvStatic && typeof cvStatic === "object") { + return { ...EMPTY_CV, ...cvStatic }; + } + return EMPTY_CV; } diff --git a/_data/cvPageConfig.js b/_data/cvPageConfig.js index b582fd9..0776008 100644 --- a/_data/cvPageConfig.js +++ b/_data/cvPageConfig.js @@ -12,6 +12,7 @@ import EleventyFetch from "@11ty/eleventy-fetch"; import { readFileSync } from "node:fs"; import { resolve, dirname } from "node:path"; import { fileURLToPath } from "node:url"; +import cvPageConfigStatic from "./cvPageConfigStatic.js"; const __dirname = dirname(fileURLToPath(import.meta.url)); const INDIEKIT_URL = @@ -71,5 +72,9 @@ export default async function () { return localConfig; } + if (cvPageConfigStatic && typeof cvPageConfigStatic === "object") { + return cvPageConfigStatic; + } + return null; } diff --git a/_data/cvPageConfigStatic.js b/_data/cvPageConfigStatic.js new file mode 100644 index 0000000..f40e810 --- /dev/null +++ b/_data/cvPageConfigStatic.js @@ -0,0 +1,6 @@ +/** + * Repository-managed CV page config fallback. + * Keep `null` to use the default layout in cv.njk. + */ + +export default null; diff --git a/_data/cvStatic.js b/_data/cvStatic.js new file mode 100644 index 0000000..bb9203c --- /dev/null +++ b/_data/cvStatic.js @@ -0,0 +1,16 @@ +/** + * Repository-managed CV fallback data. + * Edit this file to maintain CV content without the backend CV plugin. + */ + +export default { + lastUpdated: null, + experience: [], + projects: [], + skills: {}, + skillTypes: {}, + languages: [], + education: [], + interests: {}, + interestTypes: {}, +}; diff --git a/theme/_data/cv.js b/theme/_data/cv.js index ec78d39..10f0e8e 100644 --- a/theme/_data/cv.js +++ b/theme/_data/cv.js @@ -12,6 +12,7 @@ import EleventyFetch from "@11ty/eleventy-fetch"; import { readFileSync } from "node:fs"; import { resolve, dirname } from "node:path"; import { fileURLToPath } from "node:url"; +import cvStatic from "./cvStatic.js"; const __dirname = dirname(fileURLToPath(import.meta.url)); const INDIEKIT_URL = @@ -75,5 +76,9 @@ export default async function () { return { ...EMPTY_CV, ...localData }; } + if (cvStatic && typeof cvStatic === "object") { + return { ...EMPTY_CV, ...cvStatic }; + } + return EMPTY_CV; } diff --git a/theme/_data/cvPageConfig.js b/theme/_data/cvPageConfig.js index b582fd9..0776008 100644 --- a/theme/_data/cvPageConfig.js +++ b/theme/_data/cvPageConfig.js @@ -12,6 +12,7 @@ import EleventyFetch from "@11ty/eleventy-fetch"; import { readFileSync } from "node:fs"; import { resolve, dirname } from "node:path"; import { fileURLToPath } from "node:url"; +import cvPageConfigStatic from "./cvPageConfigStatic.js"; const __dirname = dirname(fileURLToPath(import.meta.url)); const INDIEKIT_URL = @@ -71,5 +72,9 @@ export default async function () { return localConfig; } + if (cvPageConfigStatic && typeof cvPageConfigStatic === "object") { + return cvPageConfigStatic; + } + return null; } diff --git a/theme/_data/cvPageConfigStatic.js b/theme/_data/cvPageConfigStatic.js new file mode 100644 index 0000000..f40e810 --- /dev/null +++ b/theme/_data/cvPageConfigStatic.js @@ -0,0 +1,6 @@ +/** + * Repository-managed CV page config fallback. + * Keep `null` to use the default layout in cv.njk. + */ + +export default null; diff --git a/theme/_data/cvStatic.js b/theme/_data/cvStatic.js new file mode 100644 index 0000000..bb9203c --- /dev/null +++ b/theme/_data/cvStatic.js @@ -0,0 +1,16 @@ +/** + * Repository-managed CV fallback data. + * Edit this file to maintain CV content without the backend CV plugin. + */ + +export default { + lastUpdated: null, + experience: [], + projects: [], + skills: {}, + skillTypes: {}, + languages: [], + education: [], + interests: {}, + interestTypes: {}, +};