OK, lets NOT use submodules
This commit is contained in:
parent
04159a9cc4
commit
2ac80fe8f2
@ -23,10 +23,6 @@ steps:
|
|||||||
- senpai
|
- senpai
|
||||||
commands:
|
commands:
|
||||||
- sed -i '$s/$/,latest/' .tags
|
- sed -i '$s/$/,latest/' .tags
|
||||||
- name: submodules
|
|
||||||
image: alpine/git
|
|
||||||
commands:
|
|
||||||
- git submodule update --init --recursive
|
|
||||||
- name: build-image
|
- name: build-image
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
|
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -1,3 +0,0 @@
|
|||||||
[submodule "public/content"]
|
|
||||||
path = public/content
|
|
||||||
url = https://git.c0ntroller.de/c0ntroller/frontpage-content.git
|
|
@ -1,7 +1,7 @@
|
|||||||
// This file is used to generate the HTML for the projects and diaries in the backend.
|
// This file is used to generate the HTML for the projects and diaries in the backend.
|
||||||
// We can use fs and stuff here.
|
// We can use fs and stuff here.
|
||||||
|
|
||||||
import { readdirSync } from "fs";
|
import { Dirent, readdirSync } from "fs";
|
||||||
import { readFile } from "node:fs/promises";
|
import { readFile } from "node:fs/promises";
|
||||||
import { resolve } from "path";
|
import { resolve } from "path";
|
||||||
import type { Project, Diary } from "./types";
|
import type { Project, Diary } from "./types";
|
||||||
@ -16,10 +16,17 @@ const ad = asciidoctor();
|
|||||||
const listPath = resolve("./public", "content", "list.json");
|
const listPath = resolve("./public", "content", "list.json");
|
||||||
const projectPath = resolve("./public", "content", "projects");
|
const projectPath = resolve("./public", "content", "projects");
|
||||||
const diaryPath = resolve("./public", "content", "diaries");
|
const diaryPath = resolve("./public", "content", "diaries");
|
||||||
// No error catching here as we are screwed if this fails
|
// Error catching as this is evaluated at build time
|
||||||
const projectFiles = readdirSync(projectPath, { withFileTypes: true }).filter((f) => f.isFile() && f.name.endsWith(".adoc"));
|
let pf: Dirent[] = [];
|
||||||
|
let df: Dirent[] = [];
|
||||||
|
try { pf = readdirSync(projectPath, { withFileTypes: true }).filter((f) => f.isFile() && f.name.endsWith(".adoc")) }
|
||||||
|
catch {}
|
||||||
// As we need the diaries too, no filter here
|
// As we need the diaries too, no filter here
|
||||||
const diaryFiles = readdirSync(diaryPath, { withFileTypes: true });
|
try { df = readdirSync(diaryPath, { withFileTypes: true }) }
|
||||||
|
catch {}
|
||||||
|
|
||||||
|
const projectFiles = pf;
|
||||||
|
const diaryFiles = df;
|
||||||
|
|
||||||
export async function getContentList() {
|
export async function getContentList() {
|
||||||
try {
|
try {
|
||||||
|
@ -1 +0,0 @@
|
|||||||
Subproject commit 998c1962b606ca58dad6eaed457a8f89df6b250b
|
|
Loading…
Reference in New Issue
Block a user