diff --git a/generate/index.ts b/generate/index.ts
index 5010cf7..5428948 100644
--- a/generate/index.ts
+++ b/generate/index.ts
@@ -28,7 +28,8 @@ export const map: Map = {
}
export const seriesMap: SeriesMap = {}
export const portfolioData: PortfolioData = {
- overview: "",
+ overview_en: "",
+ overview_kr: "",
skills: new Set(),
projects: {},
}
diff --git a/generate/recursiveParse/parsePortfolio.ts b/generate/recursiveParse/parsePortfolio.ts
index d972a27..f81cc4b 100644
--- a/generate/recursiveParse/parsePortfolio.ts
+++ b/generate/recursiveParse/parsePortfolio.ts
@@ -9,12 +9,14 @@ import { portfolioData } from ".."
import { DataToPass } from "."
export default function parsePortfolio(data: DataToPass): void {
- const { urlPath, markdownRaw, markdownData } = data
+ const { urlPath, markdownRaw, markdownData, path } = data
// check if the file is a portfolio overview or a project
// explanation: file `0.md` is a special file (i.e. not a regular project file)
- if (urlPath.slice(urlPath.lastIndexOf("/") + 1) == "0") {
- portfolioData.overview = markdownData.content
+ if (path.endsWith("/0.md")) {
+ portfolioData.overview_en = markdownData.content
+ } else if (path.endsWith("/0.kr.md")) {
+ portfolioData.overview_kr = markdownData.content
} else {
if (!urlPath.endsWith(".kr")) {
if (markdownData.badges) {
diff --git a/markdown/portfolio/0.kr.md b/markdown/portfolio/0.kr.md
new file mode 100644
index 0000000..538fa91
--- /dev/null
+++ b/markdown/portfolio/0.kr.md
@@ -0,0 +1,7 @@
+## 교육
+
+현재 [홍익대학교](https://wwwce.hongik.ac.kr) 컴퓨터공학과에 진학중.
+
+## 기술
+
+
diff --git a/src/pages/Portfolio/index.tsx b/src/pages/Portfolio/index.tsx
index cf3177e..88f81bf 100644
--- a/src/pages/Portfolio/index.tsx
+++ b/src/pages/Portfolio/index.tsx
@@ -1,15 +1,20 @@
-import { useEffect, useState } from "react"
+import { useContext, useEffect, useState } from "react"
import { Helmet } from "react-helmet-async"
import MainContent from "../../components/MainContent"
-import ProjectCard from "./ProjectCard"
import Badge from "../../components/Badge"
+import ProjectCard from "./ProjectCard"
import portfolio from "../../data/portfolio.json"
-import { PortfolioProject } from "../../../types/types"
+import { globalContext } from "../../globalContext"
+
+import type { PortfolioProject } from "../../../types/types"
const Portfolio = () => {
+ const { globalState } = useContext(globalContext)
+ const locale = globalState.locale
+
const [projects, setProjects] = useState([])
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const [skills, setSkills] = useState([])
@@ -43,7 +48,7 @@ const Portfolio = () => {
return (
<>
- pomp | Portfolio
+ pomp | {locale == "en" ? "Portfolio" : "포트폴리오"}
@@ -56,13 +61,18 @@ const Portfolio = () => {
- Portfolio
+ {locale == "en" ? "Portfolio" : "포트폴리오"}
{/* rendered markdown */}
-
+
{/* Projects */}
@@ -70,7 +80,7 @@ const Portfolio = () => {
#
{" "}
- Projects
+ {locale == "en" ? "Projects" : "프로젝트"}
{/* todo: filter projects by skill */}
diff --git a/types/types.ts b/types/types.ts
index 6decfde..4f9724f 100644
--- a/types/types.ts
+++ b/types/types.ts
@@ -111,7 +111,8 @@ export interface SeriesEntry {
export interface PortfolioData {
// rendered markdown html
- overview: string
+ overview_en: string
+ overview_kr: string
// a set of valid simple icons slug
skills: Set