๐ธ Haguri & Peng's Blog ๐ง
Vue3 + Typescript + Vite์ ํตํด ํ๊ฒฝ์ ๊ตฌ์ฑํ์์ผ๋ฉฐ, Ex-Repository ์ ์์ค๋ฅผ ๋ฆฌํฉํ ๋ง ํ์์ต๋๋ค.
- 2025/8/9 Vue3 Snackbar ์ ์ฉ
- 2025/8/4 Custom Cursor ์ ์ฉ
- 2025/2/22 ์์ค ์ ๋น ๋ฐ ์ฃผ์ ๊ตฌ์ฒดํ
- 2024/11/20 ๋ ์ง ๊ด๋ จ ๋ผ์ด๋ธ๋ฌ๋ฆฌ ๋ณ๊ฒฝ (Moment.js -> date-fns)
- 2024/11/10 Content์์ ํ์ฌ ํ์ฑํ(active) ์ค์ธ aside ์์ญ์ underline ์ค์ 
๊ฒ์๊ธ(post)์์ ์ด์  ํ์ด์ง๋ก ์ด๋ ์ ํ์ด์ง ์ ๋ณด์ ๊ฒ์์ด๋ฅผ ์ ์ฅํ๊ธฐ ์ํด ์ฌ์ฉ
// category.ts
import { reactive, computed } from 'vue';
import { defineStore } from 'pinia';
import { CategoryInfo } from '@/types';
const setValue = <T>(obj: T, key: keyof T, value: T[keyof T]) => {
  obj[key] = value;
};
export const useCategoryStore = defineStore('category', () => {
  const categoryInfo = reactive(<CategoryInfo>{});
  const getCategoryInfo = computed(() => categoryInfo);
  function setCategoryInfo(pCategoryInfo: CategoryInfo) {
    for (const key of Object.keys(pCategoryInfo)) {
      const categoryKey = key as keyof CategoryInfo;
      setValue<CategoryInfo>(
        categoryInfo,
        categoryKey,
        pCategoryInfo[categoryKey],
      );
    }
  }
  function clearCategoryInfo() {
    const initData = <CategoryInfo>{};
    for (const key of Object.keys(categoryInfo)) {
      const categoryKey = key as keyof CategoryInfo;
      setValue<CategoryInfo>(categoryInfo, categoryKey, initData[categoryKey]);
    }
  }
  return { categoryInfo, getCategoryInfo, setCategoryInfo, clearCategoryInfo };
});- Gitart Vue Dialog
 (๋๊ธ/๋ฐฉ๋ช ๋ก ๋ฑ๋ก, RecentTag)
2024/3/5 ์ดํ๋ก Tistory Open API๋ ์๋น์ค ์ข
๋ฃ!!
Tistory ์์ ์ ๊ณตํ๋ Open API ๋ฅผ ํ์ฉ (Tistory Open API).
์ ๊ณตํด์ฃผ๋ Open API ์ ํ๊ณ๊ฐ ์์ด ์ด๋ฅผ ๊ฐ์ํ๊ณ  ๊ฐ๋ฐํ์์ผ๋ ์ฐธ๊ณ  ๋ฐ๋๋๋ค.
๋ชจ๋ฐ์ผ ํ์ด์ง๋ Tistory์์ ์๋์ผ๋ก ์ ๊ณตํ๋ฉฐ,
๋ชจ๋ฐ์ผ๋ก ์ ์ํ๋ ๊ฒฝ์ฐ์ ๋ชจ๋ฐ์ผ ํ์ด์ง(/m)๋ก redirect ์ฒ๋ฆฌํ๊ณ  ์์ต๋๋ค.
Open API๋ 2024๋
 2์๊น์ง ์์ฐจ์ ์ผ๋ก ์๋น์ค๊ฐ ์ข
๋ฃ๋ฉ๋๋ค.
์๋น์ค ์ข
๋ฃ ์๋ด ๋งํฌ
- Header์ ๊ณต์ง์ฌํญ(Notice) ๋ฉ๋ด ์ ์ฉ
- ์นดํ ๊ณ ๋ฆฌ Level(1, 2)๋ณ ์ด๋ ์ฒ๋ฆฌ
- ์นดํ ๊ณ ๋ฆฌ ํด๋ฆญ ์, ํ์ ์นดํ ๊ณ ๋ฆฌ๊ฐ ์๋ ๊ฒฝ์ฐ ํ์ ์นดํ ๊ณ ๋ฆฌ๋ฅผ ๋ณด์ฌ์ค
- ํด๋น ์นดํ ๊ณ ๋ฆฌ๊ฐ ๋น์ด(์์ฑ๊ธ 0๊ฐ) ์๋ ๊ฒฝ์ฐ ๋ ธ์ถํ์ง ์์
- ๊ธ ๋ชฉ๋ก ํ์ด์ง ์ฒ๋ฆฌ
- ๊ฒ์ ๋ฐ ๊ฒ์ ํ์ด์ง ์ด๋
- ๋๊ธ ๋ฑ๋ก
- ๋๊ธ ์์ /์ญ์ 
- ๋ฐฉ๋ช ๋ก ๋ฑ๋ก
- ๋ฐฉ๋ช ๋ก ์์ /์ญ์ 
- ์ข์์ ์ค์ /ํด์ 
- ๊ด๊ณ
- Google Adsense: ๋ธ๋ก๊ทธ ์ ๋ฐ์ ์ ์ฉ
- Kakao Adfit: Side ์์ญ ๋ฐ ํฌ์คํ ์ ํ ๊ฐ์ฉ ์ ์ฉ
- Tenping: ํฌ์คํ ์ ํ ๊ฐ์ฉ ์ ์ฉ
๊ฐ ๊ฒ์๊ธ์ ์ ์ฉ๋๋ ๋ถ๋ถ์ ์์ฑ ์์ ์๋ํฐ์์ ์๋์ผ๋ก ์ถ๊ฐํ๋ ๋ถ๋ถ์ ๋๋ค.
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 <script setup> SFCs, check out the script setup docs to learn more.
- VS Code + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).
TypeScript cannot handle type information for .vue imports by default, so we replace the tsc CLI with vue-tsc for type checking. In editors, we need TypeScript Vue Plugin (Volar) to make the TypeScript language service aware of .vue types.
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a Take Over Mode that is more performant. You can enable it by the following steps:
- Disable the built-in TypeScript Extension
- Run Extensions: Show Built-in Extensionsfrom VSCode's command palette
- Find TypeScript and JavaScript Language Features, right click and selectDisable (Workspace)
 
- Run 
- Reload the VSCode window by running Developer: Reload Windowfrom the command palette.
npm run devnpm run build
# ์๋ ๋ช
๋ น์ด๋ฅผ ์คํํ๋ฉด postbuild๊ฐ ์คํ๋์ง ์๊ณ  ๋น๋๋ง ์งํํฉ๋๋ค.
npm run buildOnly์ ์์ ์ผ๋ก ๋น๋๋๋ฉด, dist ํด๋์ ๊ด๋ จ ํ์ผ๋ค์ด ์์ฑ๋๋๋ฐ, index.html ํ์ผ๊ณผ /images ํด๋ ๋ด์ ์๋ ํ์ผ์ ๋ชจ๋ ์คํจ์ ์
๋ก๋ํด์ผ ํฉ๋๋ค.
- ๋น๋ ์์ ์ดํ์ ์๋ ๋ ์คํฌ๋ฆฝํธ๊ฐ ์๋์ผ๋ก(package.json์ scripts์ postbuild๋ก ์ ์) ์ํ๋ฉ๋๋ค.
- replace-paths.cjs : ๊ฐ๋ฐ ์ ๋ด๋ถ์ ์ผ๋ก ์ฌ์ฉํ๋ ๊ฒฝ๋ก๋ฅผ ์ค์  ๋ธ๋ก๊ทธ ๊ฒฝ๋ก๋ก ๋ณ๊ฒฝํ๋ ์์
- tistory-skin.cjs : ๋น๋๋ ํ์ผ์ ๋ธ๋ก๊ทธ์ ์คํจ์ ์ ๋ก๋
https://tistory4.daumcdn.net/tistory/2876097/skin/
/tistory/ ๊ฒฝ๋ก ๋ค์์ ๋์ค๋ ์ซ์ ๊ฐ์ด Tistory ๋ธ๋ก๊ทธ๋ง๋ค ๊ฐ์ง๊ณ  ์๋ ๊ณ ์  ID ๊ฐ์ธ ๊ฒ ๊ฐ์๋ฐ์. ์ด ๊ฐ์ ์ค์  ๋ฐฐํฌํ ๋ค์์ console ์ฐฝ์ error ๋ก ๋ํ๋๋ ๊ฐ์ ํ์ธํด์ผ ํ์ธํ  ์ ์์ต๋๋ค.
์ค์  ์ค์ ๋๋ ๊ฐ(์: js ํ์ผ)์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
https://tistory4.daumcdn.net/tistory/2876097/skin/images/index-[name].js
๋น๋๋ ํ์ผ์ ๋ธ๋ก๊ทธ์ ์
๋ก๋ ํฉ๋๋ค.
(๋จ, ๋ก๊ทธ์ธ ํ  ๋๋ง๋ค TSSESSION ๊ฐ์ด ๋ฐ๋๊ธฐ ๋๋ฌธ์ ์ด ๋ถ๋ถ์ ์์
ํ๊ธฐ ์ด์ ์ ํ์ธ์๋ง)
๊ฐํน '์ผ์์ ์ธ ๋ฌธ์ ๊ฐ ๋ฐ์ํ์ฌ ์ค๋ฅ๊ฐ ๋ฐ์'์ด๋ผ๋ฉด์ ์
๋ก๋๊ฐ ์ ๋๋๋ฐ, ๋ค์ ๋น๋ ๋ช
๋ น์ด๋ฅผ ๋ด๋ฆฌ๋ฉด ์ ์์ ์ผ๋ก ์
๋ก๋๋ฉ๋๋ค.
