Simpesys / Simpesys / ์„ค์ •

์„ค์ •

์ด ๋ฌธ์„œ๋Š” Simpesys์—์„œ ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ๋ชจ๋“  ์„ค์ • ์˜ต์…˜์„ ์„ค๋ช…ํ•œ๋‹ค. Simpesys ์„ค์ •์€ config์™€ hooks ๋‘ ๊ฐœ์˜ ์ตœ์ƒ์œ„ ์†์„ฑ์„ ๊ฐ€์ง„ ๊ฐ์ฒด๋กœ ์ƒ์„ฑ์ž์— ์ „๋‹ฌ๋œ๋‹ค. ๋ชจ๋“  ์†์„ฑ์€ ์„ ํƒ์‚ฌํ•ญ์ด๋ฉฐ, ๊ธฐ๋ณธ๊ฐ’์ด ์žˆ๋‹ค.

const simpesys = new Simpesys({
  config: { /* ... */ },
  hooks: { /* ... */ },
});

Config

config.web

์›น ๊ด€๋ จ ์„ค์ •.

์˜ต์…˜ ํƒ€์ž… ๊ธฐ๋ณธ๊ฐ’ ์„ค๋ช…
domain string "localhost:8000" ์›น์‚ฌ์ดํŠธ ๋„๋ฉ”์ธ. ๋‚ด๋ถ€ ๋„๋ฉ”์ธ์„ ์‹๋ณ„ํ•˜๋Š” ๋ฐ ์‚ฌ์šฉ๋œ๋‹ค.

config.project

ํ”„๋กœ์ ํŠธ ๊ตฌ์กฐ ์„ค์ •.

์˜ต์…˜ ํƒ€์ž… ๊ธฐ๋ณธ๊ฐ’ ์„ค๋ช…
root string "./" ํ”„๋กœ์ ํŠธ ๋ฃจํŠธ ๋””๋ ‰ํ„ฐ๋ฆฌ์˜ ์ ˆ๋Œ€ ๋˜๋Š” ์ƒ๋Œ€ ๊ฒฝ๋กœ.
docs string "docs" ํ”„๋กœ์ ํŠธ ๋ฃจํŠธ ๊ธฐ์ค€ ๋ฌธ์„œ ๋””๋ ‰ํ„ฐ๋ฆฌ ์ƒ๋Œ€ ๊ฒฝ๋กœ.

config.docs

๋ฌธ์„œ ์ฒ˜๋ฆฌ ์„ค์ •.

์˜ต์…˜ ํƒ€์ž… ๊ธฐ๋ณธ๊ฐ’ ์„ค๋ช…
root string "index" ๋ฃจํŠธ ๋ฌธ์„œ ํ‚ค. ๊ธฐ๋ณธ์ ์œผ๋กœ index.md์— ํ•ด๋‹นํ•œ๋‹ค.
notFound string "404" Not found ๋ฌธ์„œ์˜ ํ‚ค. ๋‚ด๋ถ€ ๋งํฌ๋ฅผ ํ•ด์„ํ•  ์ˆ˜ ์—†์„ ๋•Œ ์‚ฌ์šฉ๋œ๋‹ค.
linkStyle "simpesys" | "obsidian" "simpesys" ๋‚ด๋ถ€ ๋งํฌ ๋ฌธ๋ฒ• ์Šคํƒ€์ผ. ๋‚ด๋ถ€ ๋งํฌ ์ฐธ๊ณ .
subdocumentsSectionTitle string[] "Subpages" ํ•˜์œ„ ๋ฌธ์„œ ์„น์…˜์„ ํ‘œ์‹œํ•˜๋Š” ๋ ˆ๋ฒจ 2 ์ œ๋ชฉ.
publicationsSectionTitle string[] "Publications" ํ•˜์œ„ ๋ฌธ์„œ ๋‚ด์—์„œ ์ถœํŒ๋ฌผ ์œ ํ˜• ๋ฌธ์„œ๋ฅผ ํ‘œ์‹œํ•˜๋Š” ๋ ˆ๋ฒจ 3 ์ œ๋ชฉ.
backlinksSectionTitle string "Backlinks" ์ž๋™ ์ƒ์„ฑ๋˜๋Š” ๋ฐฑ๋งํฌ ์„น์…˜์˜ ๋ ˆ๋ฒจ 2 ์ œ๋ชฉ.

config.docs.toc

๋ชฉ์ฐจ ์„ค์ •.

์˜ต์…˜ ํƒ€์ž… ๊ธฐ๋ณธ๊ฐ’ ์„ค๋ช…
listType "ul" | "ol" "ul" ๋ชฉ์ฐจ์˜ HTML ๋ฆฌ์ŠคํŠธ ์œ ํ˜•.
levels number[] [2, 3, 4] ๋ชฉ์ฐจ์— ํฌํ•จํ•  ์ œ๋ชฉ ๋ ˆ๋ฒจ.

Hooks

ํ›…์€ ๋นŒ๋“œ ํŒŒ์ดํ”„๋ผ์ธ์˜ ๋™์ž‘์„ ์ปค์Šคํ„ฐ๋งˆ์ด์ง•ํ•˜๊ธฐ ์œ„ํ•œ ์ฝœ๋ฐฑ ํ•จ์ˆ˜๋‹ค.

ํ›… ์‹œ๊ทธ๋‹ˆ์ฒ˜ ์„ค๋ช…
manipulateMarkdown (markdown: string, candidate: DocumentCandidate) => string ์ฒ˜๋ฆฌ ์ „ ๋งˆํฌ๋‹ค์šด ์ฝ˜ํ…์ธ ๋ฅผ ๋ณ€ํ™˜ํ•œ๋‹ค.
onInternalLinkUnresolved (error: Error) => void ๋‚ด๋ถ€ ๋งํฌ๋ฅผ ํ•ด์„ํ•  ์ˆ˜ ์—†์„ ๋•Œ ์‹คํ–‰ํ•œ๋‹ค.
renderInternalLink (key: string, label?: string) => string ๋‚ด๋ถ€ ๋งํฌ๋ฅผ HTML๋กœ ๋ Œ๋”๋งํ•œ๋‹ค.
  • Simpesys
  • ์•„ํ‚คํ…์ฒ˜
    • ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ์˜ต์…˜์— ๋Œ€ํ•œ ์ž์„ธํ•œ ๋‚ด์šฉ์€ ์„ค์ • ๋ฌธ์„œ๋ฅผ ์ฐธ๊ณ ํ•œ๋‹ค.