Add repo-managed static CV data fallbacks

This commit is contained in:
svemagie
2026-03-08 06:49:12 +01:00
parent dd400cbef5
commit 69da442fe0
8 changed files with 64 additions and 0 deletions

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -0,0 +1,6 @@
/**
* Repository-managed CV page config fallback.
* Keep `null` to use the default layout in cv.njk.
*/
export default null;

16
_data/cvStatic.js Normal file
View File

@@ -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: {},
};

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -0,0 +1,6 @@
/**
* Repository-managed CV page config fallback.
* Keep `null` to use the default layout in cv.njk.
*/
export default null;

16
theme/_data/cvStatic.js Normal file
View File

@@ -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: {},
};