Skip to content

Commit cc8e0b6

Browse files
committed
記事をいくつか追加。
1 parent c9046cc commit cc8e0b6

File tree

4 files changed

+134
-2
lines changed

4 files changed

+134
-2
lines changed
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
---
2+
title: Reborn with Next.js!
3+
date: "2025-04-28"
4+
description: "Couldn't transfer the article data (´・ω・)"
5+
---
6+
7+
# Next.js
8+
9+
Hello, World!
10+
11+
Hi! I'm The Infinity's!
12+
This time! Finally! I've successfully replaced my site with Next.js!
13+
14+
## Why I Decided to Switch to Next.js
15+
16+
There were various reasons for wanting to change my website to Next.js,
17+
but the biggest factors were **performance improvement**, **enhanced development experience**,
18+
and the realization of **SSG (Static Site Generation)**.
19+
20+
### Performance Improvement (About SSG)
21+
22+
In my previous site, slow display speed during increased traffic was a challenge. That's when I focused on Next.js's SSG (Static Site Generation). SSG is attractive because it **generates HTML files in advance, allowing for fast page display when users access the site**.
23+
24+
It's like having popular menu items prepared in advance at a restaurant, rather than cooking after receiving an order. This reduces server load and allows for **lightning-fast content delivery**!
25+
26+
### Enhanced Development Experience (TypeScript, TSX)
27+
28+
Another major reason was the improvement in development experience.
29+
I had been interested in **development with TypeScript and JSX**,
30+
and wanted to work more efficiently with type-safe, component-based development.
31+
32+
Next.js has built-in TypeScript support,
33+
and when combined with React's JSX, it allows for writing **more modern and maintainable code**.
34+
Learning TSX was quite challenging, but once I started development, I could really feel its benefits.
35+
I've noticed improved code readability and easier bug detection.
36+
Learning new technology was tough, but I feel it was definitely worth it! 💻
37+
38+
#### TypeScript Example
39+
40+
```tsx title="example.tsx" showLineNumbers
41+
"use client";
42+
43+
import { useState, useEffect } from "react";
44+
45+
export default function BackToTopButton() {
46+
const [isVisible, setIsVisible] = useState(false);
47+
48+
useEffect(() => {
49+
const handleScroll = () => {
50+
setIsVisible(window.scrollY > 300); // Show after scrolling 300px
51+
};
52+
53+
window.addEventListener("scroll", handleScroll);
54+
return () => window.removeEventListener("scroll", handleScroll);
55+
}, []);
56+
57+
const scrollToTop = () => {
58+
window.scrollTo({ top: 0, behavior: "smooth" });
59+
};
60+
61+
return (
62+
<button
63+
onClick={scrollToTop}
64+
className={`back-to-top ${isVisible ? "visible" : ""}`}
65+
aria-label="Back to top"
66+
>
67+
<svg
68+
xmlns="http://www.w3.org/2000/svg"
69+
viewBox="0 0 24 24"
70+
fill="currentColor"
71+
width="36"
72+
height="36"
73+
>
74+
<path d="M12 4l-8 8h4l4 8l4 -8h4z" />
75+
</svg>
76+
</button>
77+
);
78+
}
79+
```
80+
81+
### Desired Feature: SSG
82+
83+
And the most desired feature was **SSG (Static Site Generation)**, which I mentioned earlier.
84+
For a site primarily focused on static content like a blog, I thought we could maximize the benefits of SSG.
85+
86+
**By generating content in advance, not only does display speed improve, but it's also advantageous from a security perspective**.
87+
It also works well with CDNs, enabling more stable content delivery.
88+
This migration to Next.js was realized from a strong desire to provide a more comfortable website experience by utilizing SSG.
89+
90+
## Summary and Future Outlook
91+
92+
This migration to Next.js has been a significant step for me, bringing performance improvements, enhanced development experience, and most importantly, the realization of a fast and stable website through SSG. Although there were unexpected challenges with article data migration, the process of rebuilding the site while learning and experiencing new technology was very stimulating and enjoyable.
93+
94+
Since we've just completed the migration, I feel we need to further utilize Next.js's features. In the future, I plan to challenge various things using this new foundation, such as introducing dynamic content and achieving more refined UI/UX.
95+
96+
Please continue to support The Infinity's!
Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
---
22
title: May Introduction
3-
date: "2025-04-30"
4-
description: ""
3+
date: "2025-05-06"
4+
description: "Grok? Are you sure?"
55
---
6+
7+
# Entering May
8+
9+
Hey there! It's The Infinity's!
10+
It's May now, isn't it?
11+
12+
Speaking of May, what's associated with it...?
13+
14+
Koinobori (carp streamers)...?
15+
What else could there be...?
16+
17+
...I don’t have much to talk about...
18+
19+
Hmm, well then!
20+
21+
Please translate this.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: 5月に入って
3+
date: "2025-05-06"
4+
description: "Grokよ...頼むからエスケープシーケンスはちゃんと処理してくれ..."
5+
---
6+
7+
# 5月に入って
8+
9+
どうも!The Infinity'sです!
10+
5月になりましたね!
11+
12+
5月と言ったら何がありますかね...
13+
14+
こいのぼりとか...?
15+
何だろうか...
16+
17+
...話す内容があまりない...
18+
19+
うーん、それじゃ!
20+
27.3 KB
Loading

0 commit comments

Comments
 (0)