Skip to content

Commit d952456

Browse files
committed
refactor: about me.
1 parent b71eb49 commit d952456

File tree

5 files changed

+23
-11
lines changed

5 files changed

+23
-11
lines changed

craco.config.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,20 @@ module.exports = {
77
pathRewrite: { '^/api/show-my-ip': '' },
88
},
99
},
10+
setupMiddlewares: (middlewares, devServer) => {
11+
if (!devServer) {
12+
throw new Error('webpack-dev-server is not defined');
13+
}
14+
15+
devServer.app.use((req, res, next) => {
16+
if (req.path.endsWith('.piml')) {
17+
res.set('Content-Type', 'text/plain');
18+
}
19+
next();
20+
});
21+
22+
return middlewares;
23+
},
1024
},
1125
webpack: {
1226
configure: (webpackConfig, { env, paths }) => {

public/about-me/about.piml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
(title) About Me👨‍💻
2+
(email) samil.bulbul@gmail.com
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ I'm a big fan of open-source and love the challenge of solving tricky problems.
44
When I'm not coding, you can probably find me exploring new tech or enjoying a good cup of coffee ☕.
55
I'm always learning and excited to see what's next!
66

7-
8-
97
## Experience
108

119
1. **Senior Software Engineer** at *Picus Security* (Oct 2022 - Sep 2025)
@@ -29,4 +27,4 @@ I'm always learning and excited to see what's next!
2927

3028
* **🎵 Making Music:** I'm currently exploring the world of music production, creating some sick beats and melodies. It's a fun way to unwind and get creative, but my tracks are still top secret! 🤫
3129
* **📚 Reading:** Trying to read all the books I purchase... It's a work in progress!
32-
* **🤔 Thinking about:** How to build the perfect mechanical keyboard and create the best sound system.
30+
* **🤔 Thinking about:** How to build the perfect mechanical keyboard and create the best sound system.

public/data/about.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/pages/AboutPage.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
EnvelopeIcon,
88
} from '@phosphor-icons/react';
99
import useSeo from '../hooks/useSeo';
10+
import piml from 'piml';
1011

1112
const LinkRenderer = ({ href, children }) => {
1213
const isExternal = href.startsWith('http') || href.startsWith('https');
@@ -45,15 +46,16 @@ const AboutPage = () => {
4546
const fetchAboutContent = async () => {
4647
try {
4748
const [metaResponse, contentResponse] = await Promise.all([
48-
fetch('/data/about.json'),
49-
fetch('/about.txt'),
49+
fetch('/about-me/about.piml'),
50+
fetch('/about-me/about.txt'),
5051
]);
5152

5253
let attributes = {};
5354
if (metaResponse.ok) {
54-
attributes = await metaResponse.json();
55+
const pimlText = await metaResponse.text();
56+
attributes = piml.parse(pimlText);
5557
} else {
56-
console.error('Failed to fetch about.json');
58+
console.error('Failed to fetch about.piml');
5759
}
5860

5961
let body = '';

0 commit comments

Comments
 (0)