Add repo-managed static CV data fallbacks
This commit is contained in:
@@ -12,6 +12,7 @@ import EleventyFetch from "@11ty/eleventy-fetch";
|
|||||||
import { readFileSync } from "node:fs";
|
import { readFileSync } from "node:fs";
|
||||||
import { resolve, dirname } from "node:path";
|
import { resolve, dirname } from "node:path";
|
||||||
import { fileURLToPath } from "node:url";
|
import { fileURLToPath } from "node:url";
|
||||||
|
import cvStatic from "./cvStatic.js";
|
||||||
|
|
||||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||||
const INDIEKIT_URL =
|
const INDIEKIT_URL =
|
||||||
@@ -75,5 +76,9 @@ export default async function () {
|
|||||||
return { ...EMPTY_CV, ...localData };
|
return { ...EMPTY_CV, ...localData };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cvStatic && typeof cvStatic === "object") {
|
||||||
|
return { ...EMPTY_CV, ...cvStatic };
|
||||||
|
}
|
||||||
|
|
||||||
return EMPTY_CV;
|
return EMPTY_CV;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import EleventyFetch from "@11ty/eleventy-fetch";
|
|||||||
import { readFileSync } from "node:fs";
|
import { readFileSync } from "node:fs";
|
||||||
import { resolve, dirname } from "node:path";
|
import { resolve, dirname } from "node:path";
|
||||||
import { fileURLToPath } from "node:url";
|
import { fileURLToPath } from "node:url";
|
||||||
|
import cvPageConfigStatic from "./cvPageConfigStatic.js";
|
||||||
|
|
||||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||||
const INDIEKIT_URL =
|
const INDIEKIT_URL =
|
||||||
@@ -71,5 +72,9 @@ export default async function () {
|
|||||||
return localConfig;
|
return localConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cvPageConfigStatic && typeof cvPageConfigStatic === "object") {
|
||||||
|
return cvPageConfigStatic;
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
6
_data/cvPageConfigStatic.js
Normal file
6
_data/cvPageConfigStatic.js
Normal 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
16
_data/cvStatic.js
Normal 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: {},
|
||||||
|
};
|
||||||
@@ -12,6 +12,7 @@ import EleventyFetch from "@11ty/eleventy-fetch";
|
|||||||
import { readFileSync } from "node:fs";
|
import { readFileSync } from "node:fs";
|
||||||
import { resolve, dirname } from "node:path";
|
import { resolve, dirname } from "node:path";
|
||||||
import { fileURLToPath } from "node:url";
|
import { fileURLToPath } from "node:url";
|
||||||
|
import cvStatic from "./cvStatic.js";
|
||||||
|
|
||||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||||
const INDIEKIT_URL =
|
const INDIEKIT_URL =
|
||||||
@@ -75,5 +76,9 @@ export default async function () {
|
|||||||
return { ...EMPTY_CV, ...localData };
|
return { ...EMPTY_CV, ...localData };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cvStatic && typeof cvStatic === "object") {
|
||||||
|
return { ...EMPTY_CV, ...cvStatic };
|
||||||
|
}
|
||||||
|
|
||||||
return EMPTY_CV;
|
return EMPTY_CV;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import EleventyFetch from "@11ty/eleventy-fetch";
|
|||||||
import { readFileSync } from "node:fs";
|
import { readFileSync } from "node:fs";
|
||||||
import { resolve, dirname } from "node:path";
|
import { resolve, dirname } from "node:path";
|
||||||
import { fileURLToPath } from "node:url";
|
import { fileURLToPath } from "node:url";
|
||||||
|
import cvPageConfigStatic from "./cvPageConfigStatic.js";
|
||||||
|
|
||||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||||
const INDIEKIT_URL =
|
const INDIEKIT_URL =
|
||||||
@@ -71,5 +72,9 @@ export default async function () {
|
|||||||
return localConfig;
|
return localConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cvPageConfigStatic && typeof cvPageConfigStatic === "object") {
|
||||||
|
return cvPageConfigStatic;
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
6
theme/_data/cvPageConfigStatic.js
Normal file
6
theme/_data/cvPageConfigStatic.js
Normal 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
16
theme/_data/cvStatic.js
Normal 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: {},
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user