Skip to content

Commit 9915fb8

Browse files
diegomartyactions-user
authored andcommitted
💚 Auto Code format by prettier
1 parent 267b100 commit 9915fb8

File tree

10 files changed

+604
-605
lines changed

10 files changed

+604
-605
lines changed

‎scripts/build.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import fs from 'fs';
2-
3-
// delete first the posts folder from the public/assets folder, then move the posts folder from root to public/assets
4-
fs.rmSync('public/assets/posts', { recursive: true });
5-
fs.renameSync('posts', 'public/assets/posts');
1+
import fs from "fs";
2+
3+
// delete first the posts folder from the public/assets folder, then move the posts folder from root to public/assets
4+
fs.rmSync("public/assets/posts", { recursive: true });
5+
fs.renameSync("posts", "public/assets/posts");

‎src/components/SEO.astro

+121-121
Original file line numberDiff line numberDiff line change
@@ -1,121 +1,121 @@
1-
---
2-
export interface Props {
3-
title?: string;
4-
description?: string;
5-
siteName?: string;
6-
canonical?: string;
7-
ogImage?: string;
8-
ogType?: string;
9-
twitterHandle?: string;
10-
slug?: string;
11-
}
12-
13-
const DOMAIN = "https://diegomarty.com/";
14-
const DEFAULT_OG_IMAGE = "https://diegomarty.com/assets/diego-marty-og.jpg";
15-
const {
16-
title = "DiegoMarty WebDev",
17-
description = "Descubre la belleza y la simplicidad de la web con la página creada por DiegoMarty usando el framework #Astro.js. Disfruta de una experiencia de usuario rápida y segura en un sitio web moderno y atractivo.",
18-
siteName = "DiegoMarty.com",
19-
canonical = DOMAIN,
20-
ogImage = DEFAULT_OG_IMAGE,
21-
ogType = "website",
22-
twitterHandle = "@Diego_Marty96",
23-
slug = undefined,
24-
} = Astro.props as Props;
25-
---
26-
27-
{
28-
title === "DiegoMarty.com" ? (
29-
<title>{`${siteName}`}</title>
30-
) : (
31-
<title>{`${title} | ${siteName}`}</title>
32-
)
33-
}
34-
35-
<meta charset="UTF-8" />
36-
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
37-
<meta
38-
name="viewport"
39-
content="minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no, viewport-fit=cover"
40-
/>
41-
<meta name="generator" content={Astro.generator} />
42-
43-
<meta name="robots" content="index,follow" />
44-
<meta name="googlebot" content="index,follow" />
45-
46-
<meta
47-
name="title"
48-
content={title === "DiegoMarty.com"
49-
? "DiegoMarty.com | Web Developer"
50-
: `${title} | ${siteName}`}
51-
/>
52-
<meta name="description" content={description} />
53-
54-
<meta property="og:type" content={ogType} />
55-
<meta property="og:url" content={canonical} />
56-
<meta
57-
property="og:title"
58-
content={title === "DiegoMarty.com"
59-
? "Portfolio & Blog"
60-
: `${title} | ${siteName}`}
61-
/>
62-
<meta property="og:description" content={description} />
63-
<meta
64-
property="og:image"
65-
content={slug !== undefined ? `/assets/posts/${slug}.png` : ogImage}
66-
/>
67-
<meta
68-
property="og:image:alt"
69-
content={slug !== undefined
70-
? title + "Social Image"
71-
: "Diego Marty Social Image"}
72-
/>
73-
74-
<meta property="twitter:card" content="summary_large_image" />
75-
<meta property="twitter:url" content={canonical} />
76-
<meta
77-
property="twitter:title"
78-
content={title === "DiegoMarty.com"
79-
? "Portfolio & Blog"
80-
: `${title} | ${siteName}`}
81-
/>
82-
<meta property="twitter:creator" content={twitterHandle} />
83-
<meta property="twitter:description" content={description} />
84-
<meta
85-
property="twitter:image"
86-
content={slug !== undefined ? `/assets/posts/${slug}.png` : ogImage}
87-
/>
88-
<meta
89-
property="twitter:image:alt"
90-
content={slug !== undefined
91-
? title + "Social Image"
92-
: "Diego Marty Social Image"}
93-
/>
94-
95-
<link rel="canonical" href={canonical ?? DOMAIN} />
96-
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
97-
<link rel="icon" type="image/png" sizes="16x16" href="/icons/ios/16.png" />
98-
<link rel="icon" type="image/png" sizes="32x32" href="/icons/ios/32.png" />
99-
<link rel="apple-touch-icon" sizes="57x57" href="/icons/ios/57.png" />
100-
<link rel="apple-touch-icon" sizes="72x72" href="/icons/ios/72.png" />
101-
<link rel="apple-touch-icon" sizes="76x76" href="/icons/ios/76.png" />
102-
<link rel="apple-touch-icon" sizes="114x114" href="/icons/ios/114.png" />
103-
<link rel="apple-touch-icon" sizes="120x120" href="/icons/ios/120.png" />
104-
<link rel="apple-touch-icon" sizes="144x144" href="/icons/ios/144.png" />
105-
<link rel="apple-touch-icon" sizes="152x152" href="/icons/ios/152.png" />
106-
<link rel="apple-touch-icon" sizes="180x180" href="/icons/ios/180.png" />
107-
<link
108-
rel="icon"
109-
type="image/png"
110-
sizes="192x192"
111-
href="/icons/android/192.png"
112-
/>
113-
114-
<link rel="shortcut icon" href="/favicon.ico" />
115-
<meta name="application-name" content="DiegoMarty.com" />
116-
<meta name="apple-mobile-web-app-capable" content="yes" />
117-
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
118-
<meta name="apple-mobile-web-app-title" content="DiegoMarty.com" />
119-
<meta name="format-detection" content="telephone=no" />
120-
<meta name="mobile-web-app-capable" content="yes" />
121-
<meta name="theme-color" content="#fca311" />
1+
---
2+
export interface Props {
3+
title?: string;
4+
description?: string;
5+
siteName?: string;
6+
canonical?: string;
7+
ogImage?: string;
8+
ogType?: string;
9+
twitterHandle?: string;
10+
slug?: string;
11+
}
12+
13+
const DOMAIN = "https://diegomarty.com/";
14+
const DEFAULT_OG_IMAGE = "https://diegomarty.com/assets/diego-marty-og.jpg";
15+
const {
16+
title = "DiegoMarty WebDev",
17+
description = "Descubre la belleza y la simplicidad de la web con la página creada por DiegoMarty usando el framework #Astro.js. Disfruta de una experiencia de usuario rápida y segura en un sitio web moderno y atractivo.",
18+
siteName = "DiegoMarty.com",
19+
canonical = DOMAIN,
20+
ogImage = DEFAULT_OG_IMAGE,
21+
ogType = "website",
22+
twitterHandle = "@Diego_Marty96",
23+
slug = undefined,
24+
} = Astro.props as Props;
25+
---
26+
27+
{
28+
title === "DiegoMarty.com" ? (
29+
<title>{`${siteName}`}</title>
30+
) : (
31+
<title>{`${title} | ${siteName}`}</title>
32+
)
33+
}
34+
35+
<meta charset="UTF-8" />
36+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
37+
<meta
38+
name="viewport"
39+
content="minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no, viewport-fit=cover"
40+
/>
41+
<meta name="generator" content={Astro.generator} />
42+
43+
<meta name="robots" content="index,follow" />
44+
<meta name="googlebot" content="index,follow" />
45+
46+
<meta
47+
name="title"
48+
content={title === "DiegoMarty.com"
49+
? "DiegoMarty.com | Web Developer"
50+
: `${title} | ${siteName}`}
51+
/>
52+
<meta name="description" content={description} />
53+
54+
<meta property="og:type" content={ogType} />
55+
<meta property="og:url" content={canonical} />
56+
<meta
57+
property="og:title"
58+
content={title === "DiegoMarty.com"
59+
? "Portfolio & Blog"
60+
: `${title} | ${siteName}`}
61+
/>
62+
<meta property="og:description" content={description} />
63+
<meta
64+
property="og:image"
65+
content={slug !== undefined ? `/assets/posts/${slug}.png` : ogImage}
66+
/>
67+
<meta
68+
property="og:image:alt"
69+
content={slug !== undefined
70+
? title + "Social Image"
71+
: "Diego Marty Social Image"}
72+
/>
73+
74+
<meta property="twitter:card" content="summary_large_image" />
75+
<meta property="twitter:url" content={canonical} />
76+
<meta
77+
property="twitter:title"
78+
content={title === "DiegoMarty.com"
79+
? "Portfolio & Blog"
80+
: `${title} | ${siteName}`}
81+
/>
82+
<meta property="twitter:creator" content={twitterHandle} />
83+
<meta property="twitter:description" content={description} />
84+
<meta
85+
property="twitter:image"
86+
content={slug !== undefined ? `/assets/posts/${slug}.png` : ogImage}
87+
/>
88+
<meta
89+
property="twitter:image:alt"
90+
content={slug !== undefined
91+
? title + "Social Image"
92+
: "Diego Marty Social Image"}
93+
/>
94+
95+
<link rel="canonical" href={canonical ?? DOMAIN} />
96+
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
97+
<link rel="icon" type="image/png" sizes="16x16" href="/icons/ios/16.png" />
98+
<link rel="icon" type="image/png" sizes="32x32" href="/icons/ios/32.png" />
99+
<link rel="apple-touch-icon" sizes="57x57" href="/icons/ios/57.png" />
100+
<link rel="apple-touch-icon" sizes="72x72" href="/icons/ios/72.png" />
101+
<link rel="apple-touch-icon" sizes="76x76" href="/icons/ios/76.png" />
102+
<link rel="apple-touch-icon" sizes="114x114" href="/icons/ios/114.png" />
103+
<link rel="apple-touch-icon" sizes="120x120" href="/icons/ios/120.png" />
104+
<link rel="apple-touch-icon" sizes="144x144" href="/icons/ios/144.png" />
105+
<link rel="apple-touch-icon" sizes="152x152" href="/icons/ios/152.png" />
106+
<link rel="apple-touch-icon" sizes="180x180" href="/icons/ios/180.png" />
107+
<link
108+
rel="icon"
109+
type="image/png"
110+
sizes="192x192"
111+
href="/icons/android/192.png"
112+
/>
113+
114+
<link rel="shortcut icon" href="/favicon.ico" />
115+
<meta name="application-name" content="DiegoMarty.com" />
116+
<meta name="apple-mobile-web-app-capable" content="yes" />
117+
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
118+
<meta name="apple-mobile-web-app-title" content="DiegoMarty.com" />
119+
<meta name="format-detection" content="telephone=no" />
120+
<meta name="mobile-web-app-capable" content="yes" />
121+
<meta name="theme-color" content="#fca311" />
+64-64
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,64 @@
1-
---
2-
import type { Post } from "../../data/post";
3-
import { Image } from "@astrojs/image/components";
4-
import Date from "../utilities/Date.astro";
5-
import ReadTime from "../utilities/ReadTime.astro";
6-
const post: Post = Astro.props.post;
7-
---
8-
9-
<div class="flex flex-col items-center sm:pb-8 sm:flex-row-reverse sm:gap-10">
10-
{
11-
post.img && (
12-
<a href={`/${post.slug}`} class="shrink-0">
13-
<Image
14-
src={post.img}
15-
alt={post.title}
16-
width={post.imgWidth}
17-
height={post.imgHeight}
18-
format={"webp"}
19-
class="object-cover w-full rounded sm:w-52 sm:h-40 bg-base-200"
20-
/>
21-
</a>
22-
)
23-
}
24-
<div class="flex flex-col">
25-
<h2 class="!my-0 text-center sm:text-left">
26-
<a
27-
class="font-semibold no-underline hover:underline"
28-
href={`/${post.slug}`}
29-
>{post.title}
30-
</a>
31-
</h2>
32-
<div
33-
class="flex flex-row items-center justify-center gap-2 pt-2 text-sm sm:justify-start"
34-
>
35-
<span>
36-
<Date date={post.date} />
37-
</span>
38-
<span>•</span>
39-
<span>
40-
<svg
41-
xmlns="http://www.w3.org/2000/svg"
42-
class="icon icon-tabler icon-tabler-book"
43-
width="20"
44-
height="20"
45-
viewBox="0 0 24 24"
46-
stroke-width="1.5"
47-
stroke="currentColor"
48-
fill="none"
49-
stroke-linecap="round"
50-
stroke-linejoin="round"
51-
>
52-
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
53-
<path d="M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0"></path>
54-
<path d="M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0"></path>
55-
<line x1="3" y1="6" x2="3" y2="19"></line>
56-
<line x1="12" y1="6" x2="12" y2="19"></line>
57-
<line x1="21" y1="6" x2="21" y2="19"></line>
58-
</svg>
59-
</span>
60-
<ReadTime slug={post.slug} />
61-
</div>
62-
<p class="text-sm text-base-content/80">{post.desc}</p>
63-
</div>
64-
</div>
1+
---
2+
import type { Post } from "../../data/post";
3+
import { Image } from "@astrojs/image/components";
4+
import Date from "../utilities/Date.astro";
5+
import ReadTime from "../utilities/ReadTime.astro";
6+
const post: Post = Astro.props.post;
7+
---
8+
9+
<div class="flex flex-col items-center sm:pb-8 sm:flex-row-reverse sm:gap-10">
10+
{
11+
post.img && (
12+
<a href={`/${post.slug}`} class="shrink-0">
13+
<Image
14+
src={post.img}
15+
alt={post.title}
16+
width={post.imgWidth}
17+
height={post.imgHeight}
18+
format={"webp"}
19+
class="object-cover w-full rounded sm:w-52 sm:h-40 bg-base-200"
20+
/>
21+
</a>
22+
)
23+
}
24+
<div class="flex flex-col">
25+
<h2 class="!my-0 text-center sm:text-left">
26+
<a
27+
class="font-semibold no-underline hover:underline"
28+
href={`/${post.slug}`}
29+
>{post.title}
30+
</a>
31+
</h2>
32+
<div
33+
class="flex flex-row items-center justify-center gap-2 pt-2 text-sm sm:justify-start"
34+
>
35+
<span>
36+
<Date date={post.date} />
37+
</span>
38+
<span>•</span>
39+
<span>
40+
<svg
41+
xmlns="http://www.w3.org/2000/svg"
42+
class="icon icon-tabler icon-tabler-book"
43+
width="20"
44+
height="20"
45+
viewBox="0 0 24 24"
46+
stroke-width="1.5"
47+
stroke="currentColor"
48+
fill="none"
49+
stroke-linecap="round"
50+
stroke-linejoin="round"
51+
>
52+
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
53+
<path d="M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0"></path>
54+
<path d="M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0"></path>
55+
<line x1="3" y1="6" x2="3" y2="19"></line>
56+
<line x1="12" y1="6" x2="12" y2="19"></line>
57+
<line x1="21" y1="6" x2="21" y2="19"></line>
58+
</svg>
59+
</span>
60+
<ReadTime slug={post.slug} />
61+
</div>
62+
<p class="text-sm text-base-content/80">{post.desc}</p>
63+
</div>
64+
</div>

0 commit comments

Comments
 (0)