Compare commits

...

5 Commits

Author SHA1 Message Date
884693ddfd Merge pull request 'feat/ssg' (#1) from feat/ssg into main
All checks were successful
Update Memento Dev on VPS / deploy (push) Successful in 4m18s
Reviewed-on: #1
2025-04-17 11:55:45 +00:00
234ee24e3f feat: Add prerender functionality and onBeforePrerenderStart 2025-04-17 13:55:20 +02:00
641e1e8a13 feat: Add prefetchStaticAssets option 2025-04-17 13:48:32 +02:00
56aba7f20a ci: Update deployment trigger on main branch 2025-04-17 13:47:28 +02:00
d3a1330e5c docs: Remove unused network configuration
All checks were successful
Update Memento Dev on VPS / deploy (push) Successful in 3m44s
2025-04-17 13:45:48 +02:00
6 changed files with 30 additions and 5 deletions

View File

@ -1,6 +1,9 @@
name: Update Memento Dev on VPS name: Update Memento Dev on VPS
run-name: ${{ gitea.actor }} is deploying the application on the VPS 🚀 run-name: ${{ gitea.actor }} is deploying the application on the VPS 🚀
on: [push] on:
push:
branches:
- main
jobs: jobs:
deploy: deploy:

View File

@ -23,5 +23,8 @@ export default {
class: "flex min-h-full bg-white dark:bg-slate-900", class: "flex min-h-full bg-white dark:bg-slate-900",
}, },
prerender: true,
prefetchStaticAssets: "hover",
extends: vikeReact, extends: vikeReact,
} satisfies Config; } satisfies Config;

View File

@ -0,0 +1,6 @@
import { docsService } from "@/services/DocsService";
export async function onBeforePrerenderStart() {
const allDocumentations = await docsService.getUrls("certifications");
return allDocumentations;
}

View File

@ -0,0 +1,6 @@
import { docsService } from "@/services/DocsService";
export async function onBeforePrerenderStart() {
const allDocumentations = await docsService.getUrls("docs");
return allDocumentations;
}

View File

@ -164,6 +164,17 @@ class DocsService {
return null; return null;
} }
} }
public async getUrls(namespace: "docs" | "certifications") {
try {
await this.fetchDocs();
const docs = Array.from(this.cache.keys()).filter((key) => key.startsWith(`/${namespace}`));
return docs;
} catch (error) {
console.error("Error fetching URLs:", error);
return [];
}
}
} }
export const docsService = DocsService.getInstance(); export const docsService = DocsService.getInstance();

View File

@ -12,7 +12,3 @@ services:
volumes: volumes:
- ./app:/app - ./app:/app
restart: unless-stopped restart: unless-stopped
networks:
memento-data:
driver: bridge