@@ -4,7 +4,7 @@ import {template} from '../../data/settings'
4
4
import {getCollection , render } from ' astro:content'
5
5
6
6
export async function getStaticPaths(): Promise <Array <{ params: { slug: string }, props: { post: any } }>> {
7
- const blogEntries = await getCollection (" blog" );
7
+ const blogEntries = await getCollection (" blog" );
8
8
9
9
return blogEntries
10
10
.map (post => {
@@ -26,30 +26,30 @@ const getValidUrl = (url: string) => {
26
26
<Layout title ={ title } >
27
27
<div class =' max-w-4xl mx-auto mb-20' >
28
28
<article
29
- class =' prose max-w-none prose-headings:text-base-content prose-p:text-base-content/80'
29
+ class =' prose max-w-none prose-headings:text-base-content prose-p:text-base-content/80'
30
30
>
31
- <!-- Header section -->
31
+ <!-- En-tête -->
32
32
<div class =' mb-8 border-b pb-8' >
33
33
<h1 class =' text-4xl font-bold mb-4 text-base-content' >{ title } </h1 >
34
34
<div class =' flex flex-wrap items-center gap-4 text-base-content/70' >
35
35
<!-- Date -->
36
36
<time datetime ={ date } class =' flex items-center' >
37
37
<svg
38
- xmlns =' http://www.w3.org/2000/svg'
39
- class =' h-4 w-4 mr-2'
40
- fill =' none'
41
- viewBox =' 0 0 24 24'
42
- stroke =' currentColor'
38
+ xmlns =' http://www.w3.org/2000/svg'
39
+ class =' h-4 w-4 mr-2'
40
+ fill =' none'
41
+ viewBox =' 0 0 24 24'
42
+ stroke =' currentColor'
43
43
>
44
44
<path
45
- stroke-linecap =' round'
46
- stroke-linejoin =' round'
47
- stroke-width =' 2'
48
- d =' M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z'
45
+ stroke-linecap =' round'
46
+ stroke-linejoin =' round'
47
+ stroke-width =' 2'
48
+ d =' M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z'
49
49
></path >
50
50
</svg >
51
51
{
52
- new Date (date ).toLocaleDateString (' en-US ' , {
52
+ new Date (date ).toLocaleDateString (' fr-FR ' , {
53
53
year: ' numeric' ,
54
54
month: ' long' ,
55
55
day: ' numeric' ,
@@ -60,19 +60,19 @@ const getValidUrl = (url: string) => {
60
60
<!-- Tags -->
61
61
{
62
62
tags && (
63
- <div class = ' flex flex-wrap gap-2' >
64
- { tags .map (tag => (
65
- <span class = ' badge badge-accent badge-outline' >{ tag } </span >
66
- ))}
67
- </div >
63
+ <div class = ' flex flex-wrap gap-2' >
64
+ { tags .map (tag => (
65
+ <span class = ' badge badge-accent badge-outline' >{ tag } </span >
66
+ ))}
67
+ </div >
68
68
)
69
69
}
70
70
</div >
71
71
</div >
72
72
73
- <!-- Post content -->
73
+ <!-- Contenu de l'article -->
74
74
<div
75
- class =' prose mt-8 prose-h2:text-2xl prose-h2:font-bold prose-h2:mb-4
75
+ class =' prose mt-8 prose-h2:text-2xl prose-h2:font-bold prose-h2:mb-4
76
76
prose-h3:text-xl prose-h3:font-semibold prose-h3:mb-3
77
77
prose-p:mb-4 prose-p:leading-relaxed
78
78
prose-strong:text-base-content prose-strong:font-bold
@@ -84,11 +84,13 @@ const getValidUrl = (url: string) => {
84
84
prose-ol:list-decimal prose-ol:pl-6
85
85
prose-li:mb-2
86
86
prose-img:rounded-lg prose-img:my-8'
87
- >
88
- <Content />
87
+ >
88
+ <Content />
89
89
</div >
90
+
91
+ <!-- Auteur et lien -->
90
92
<div class =" m-10" >
91
- Auteur: { author }
93
+ < p > Auteur : { author } </ p >
92
94
<div class =" card-actions justify-end mt-4" >
93
95
<a href ={ getValidUrl (link )} target =" _blank" class =" btn btn-sm btn-primary text-secondary-content" >
94
96
Lire plus
0 commit comments