Compare commits
5 Commits
dde25d6d9d
...
884693ddfd
| Author | SHA1 | Date | |
|---|---|---|---|
| 884693ddfd | |||
| 234ee24e3f | |||
| 641e1e8a13 | |||
| 56aba7f20a | |||
| d3a1330e5c |
@ -1,6 +1,9 @@
|
||||
name: Update Memento Dev on VPS
|
||||
run-name: ${{ gitea.actor }} is deploying the application on the VPS 🚀
|
||||
on: [push]
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
|
||||
@ -23,5 +23,8 @@ export default {
|
||||
class: "flex min-h-full bg-white dark:bg-slate-900",
|
||||
},
|
||||
|
||||
prerender: true,
|
||||
prefetchStaticAssets: "hover",
|
||||
|
||||
extends: vikeReact,
|
||||
} satisfies Config;
|
||||
|
||||
6
app/pages/certifications/+onBeforePrerenderStart.ts
Normal file
6
app/pages/certifications/+onBeforePrerenderStart.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import { docsService } from "@/services/DocsService";
|
||||
|
||||
export async function onBeforePrerenderStart() {
|
||||
const allDocumentations = await docsService.getUrls("certifications");
|
||||
return allDocumentations;
|
||||
}
|
||||
6
app/pages/docs/+onBeforePrerenderStart.ts
Normal file
6
app/pages/docs/+onBeforePrerenderStart.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import { docsService } from "@/services/DocsService";
|
||||
|
||||
export async function onBeforePrerenderStart() {
|
||||
const allDocumentations = await docsService.getUrls("docs");
|
||||
return allDocumentations;
|
||||
}
|
||||
@ -164,6 +164,17 @@ class DocsService {
|
||||
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();
|
||||
|
||||
@ -12,7 +12,3 @@ services:
|
||||
volumes:
|
||||
- ./app:/app
|
||||
restart: unless-stopped
|
||||
|
||||
networks:
|
||||
memento-data:
|
||||
driver: bridge
|
||||
|
||||
Loading…
Reference in New Issue
Block a user