chore: migration CleverCloud

main
Jalil Arfaoui 2024-11-12 15:56:02 +01:00
parent 0ef8fca9fe
commit 2a67f9b778
5 changed files with 994 additions and 31 deletions

View File

@ -6,5 +6,9 @@ export default defineConfig({
output: "hybrid",
adapter: node({
mode: "standalone"
})
}),
server: {
port: 8080,
host: true
}
});

1005
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -6,8 +6,9 @@
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"check": "astro check",
"build": "astro build",
"preview": "astro preview",
"preview": "astro preview --host 0.0.0.0 --port 8080",
"astro": "astro"
},
"dependencies": {
@ -18,6 +19,8 @@
},
"devDependencies": {
"@types/node": "^20.10.6",
"autoprefixer": "^10.4.16"
"autoprefixer": "^10.4.16",
"typescript": "^5.6.3",
"@astrojs/check": "^0.9.4"
}
}

View File

@ -1,10 +1,12 @@
---
import { Document } from '@contentful/rich-text-types';
import type { Document } from '@contentful/rich-text-types';
import { documentToHtmlString } from "@contentful/rich-text-html-renderer";
import { fetchEvenements} from "../../lib/contentful";
import Layout from "../../layouts/Layout.astro";
import Card from "../../components/Card.astro";
export const prerender = false
export async function getStaticPaths() {
const evenement = await fetchEvenements()
return evenement.map((evenement) => ({
@ -22,7 +24,6 @@ export async function getStaticPaths() {
const { nom, description, date, lieu, lieuUrl, affiche } = Astro.props;
const Wrapper = lieuUrl ? 'a' : 'div'
console.log({ nom, description, date, lieu, lieuUrl, affiche })
---
<Layout>
<h1>{nom}</h1>

View File

@ -4,6 +4,8 @@ import Card from '../components/Card.astro';
import { fetchEvenements } from "../lib/contentful";
import Evenement from "../components/Evenement.astro";
export const prerender = false
const evenements = await fetchEvenements()
---