Vimwiki Hugo Github.io ์—ฐ๋™ํ•˜๊ธฐ

์†Œ๊ฐœ ๋งˆํฌ๋‹ค์šด ๋ฌธ์„œ๋ฅผ vimwiki๋กœ ์ž‘์„ฑํ•˜์—ฌ ๊ฐ„๋‹จํ•œ ๋ฉ”๋ชจ์—์„œ ๋ถ€ํ„ฐ ๋ธ”๋กœ๊ทธ, ๋ฆฌํฌํŠธ, ๊ธฐ์ˆ  ๋ฌธ์„œ์— ์ด๋ฅด๊ธฐ๊นŒ์ง€ ์†์‰ฝ๊ฒŒ ๋งŒ๋“ค ์ˆ˜ ์žˆ๋‹ค. ์ด๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ํ•˜์—ฌ ๊นƒํ—ˆ๋ธŒ์—์„œ ์ œ๊ณตํ•˜๋Š” ๋ฌด๋ฃŒ ์›น์‚ฌ์ดํŠธ์— ์˜ฌ๋ฆฌ๋Š” ๋ฐฉ๋ฒ•์„ ์„ค๋ช…ํ•˜๊ณ ์ž ํ•œ๋‹ค. ์•„๋ž˜๋Š” ๊ฐ„๋žตํ•œ ๊ฐœ์š”์ด๋‹ค. vimwiki + hugo + github.io ๋ฅผ ์—ฐ๊ฒฐํ•˜๋Š” ํ”„๋กœ์ ํŠธ์ด๋‹ค. vim์˜ vimwiki ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ์‚ฌ์šฉํ•˜์—ฌ ์œ„ํ‚ค๋ฌธ์„œ๋ฅผ ์ž‘์„ฑํ•œ๋‹ค. ์œ„ํ‚ค๋ฌธ์„œ์˜ ์ž‘์„ฑ์€ ๋งˆํฌ๋‹ค์šด(markdown) ๋ฌธ๋ฒ•์œผ๋กœ ํ•œ๋‹ค. hugo๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ž„์‹œ ๋กœ์ปฌ์›น์„œ๋ฒ„๋ฅผ ๋„์šฐ๊ณ  ์œ„ํ‚ค๋ฌธ์„œ๋ฅผ html๋กœ ๋ณ€ํ™˜ํ•˜๊ณ  ๋ธŒ๋ผ์šฐ์ €์—์„œ ํ™•์ธํ•œ๋‹ค. ๋ณ€ํ™˜๋œ ์ •์  html ๋ฌธ์„œ๋ฅผ ๊นƒํ—ˆ๋ธŒ์— ์˜ฌ๋ฆฐ๋‹ค. ๊นƒํ—ˆ๋ธŒ ํŽ˜์ด์ง€์—์„œ ์ด๋ฅผ ํ™•์ธํ•œ๋‹ค. UTF-8์ธ์ฝ”๋”ฉ์ด๋ผ๋ฉด ํ•œ๊ธ€๋„ ํŠน๋ณ„ํžˆ ๋ฌธ์ œ๊ฐ€ ์—†๊ณ  ์ž˜ ๋œ๋‹ค. ๋‹ค๋งŒ ๋งˆํฌ๋‹ค์šด ํŒŒ์ผ๋ช…์— ๊ณต๋ฐฑ์ด ๋“ค์–ด๊ฐ€๋ฉด ๊ด€๋ฆฌ๊ฐ€ ์ข‹์ง€ ์•Š์œผ๋‹ˆ -๋“ฑ์œผ๋กœ ์—ฐ๊ฒฐํ•ด์„œ ์“ด๋‹ค. ์„ค์น˜ ํ™˜๊ฒฝ OS ๋ฐ ํ”„๋กœ๊ทธ๋žจ ๋ฒ„์ „ ...

2022-08-24 ยท (updated 2022-10-06) ยท 1366 words

Vimwiki Hugo Github.io ์—ฐ๋™ํ•˜๊ธฐ

์†Œ๊ฐœ ๋งˆํฌ๋‹ค์šด ๋ฌธ์„œ๋ฅผ vimwiki๋กœ ์ž‘์„ฑํ•˜์—ฌ ๊ฐ„๋‹จํ•œ ๋ฉ”๋ชจ์—์„œ ๋ถ€ํ„ฐ ๋ธ”๋กœ๊ทธ, ๋ฆฌํฌํŠธ, ๊ธฐ์ˆ  ๋ฌธ์„œ์— ์ด๋ฅด๊ธฐ๊นŒ์ง€ ์†์‰ฝ๊ฒŒ ๋งŒ๋“ค ์ˆ˜ ์žˆ๋‹ค. ์ด๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ํ•˜์—ฌ ๊นƒํ—ˆ๋ธŒ์—์„œ ์ œ๊ณตํ•˜๋Š” ๋ฌด๋ฃŒ ์›น์‚ฌ์ดํŠธ์— ์˜ฌ๋ฆฌ๋Š” ๋ฐฉ๋ฒ•์„ ์„ค๋ช…ํ•˜๊ณ ์ž ํ•œ๋‹ค. ์•„๋ž˜๋Š” ๊ฐ„๋žตํ•œ ๊ฐœ์š”์ด๋‹ค. vimwiki + hugo + github.io ๋ฅผ ์—ฐ๊ฒฐํ•˜๋Š” ํ”„๋กœ์ ํŠธ์ด๋‹ค. vim์˜ vimwiki ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ์‚ฌ์šฉํ•˜์—ฌ ์œ„ํ‚ค๋ฌธ์„œ๋ฅผ ์ž‘์„ฑํ•œ๋‹ค. ์œ„ํ‚ค๋ฌธ์„œ์˜ ์ž‘์„ฑ์€ ๋งˆํฌ๋‹ค์šด(../markdown) ๋ฌธ๋ฒ•์œผ๋กœ ํ•œ๋‹ค. hugo๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ž„์‹œ ๋กœ์ปฌ์›น์„œ๋ฒ„๋ฅผ ๋„์šฐ๊ณ  ์œ„ํ‚ค๋ฌธ์„œ๋ฅผ html๋กœ ๋ณ€ํ™˜ํ•˜๊ณ  ๋ธŒ๋ผ์šฐ์ €์—์„œ ํ™•์ธํ•œ๋‹ค. ๋ณ€ํ™˜๋œ ์ •์  html ๋ฌธ์„œ๋ฅผ ๊นƒํ—ˆ๋ธŒ์— ์˜ฌ๋ฆฐ๋‹ค. ๊นƒํ—ˆ๋ธŒ ํŽ˜์ด์ง€์—์„œ ์ด๋ฅผ ํ™•์ธํ•œ๋‹ค. UTF-8์ธ์ฝ”๋”ฉ์ด๋ผ๋ฉด ํ•œ๊ธ€๋„ ํŠน๋ณ„ํžˆ ๋ฌธ์ œ๊ฐ€ ์—†๊ณ  ์ž˜ ๋œ๋‹ค. ๋‹ค๋งŒ ๋งˆํฌ๋‹ค์šด ํŒŒ์ผ๋ช…์— ๊ณต๋ฐฑ์ด ๋“ค์–ด๊ฐ€๋ฉด ๊ด€๋ฆฌ๊ฐ€ ์ข‹์ง€ ์•Š์œผ๋‹ˆ -๋“ฑ์œผ๋กœ ์—ฐ๊ฒฐํ•ด์„œ ์“ด๋‹ค. ์„ค์น˜ ํ™˜๊ฒฝ OS ๋ฐ ํ”„๋กœ๊ทธ๋žจ ๋ฒ„์ „ ...

2022-08-24 ยท (updated 2022-10-06) ยท 1350 words

Hugo - Fast and flexible Static Site Generator written in Go

2022.09.08 - ๋งํฌ ์ˆ˜์ •, ์˜คํƒ€ ์ˆ˜์ • Install ubuntu ์—์„œ ํŒจํ‚ค์ง€๋กœ ์„ค์น˜ $ sudo apt install hugo $ hugo version Create a New SIte $ hugo new site my_site -f yml Add a Theme ์„ค์น˜์™€ ์„ค์ •์— ๋Œ€ํ•œ ์ž์„ธํ•œ ์‚ฌํ•ญ์€ hugo papermod๋ฅผ ์ฐธ๊ณ . PaperMod ํ…Œ๋งˆ ์„ค์น˜ $ cd my_site $ git clone https://github.com/adityatelange/hugo-PaperMod themes/PaperMod --depth=1 Update $ cd themes/PaperMod $ git pull Add theme set in config.yml $ echo 'theme: "PaperMod"' >> config.yml ๋˜๋Š” PaperMod ํ™ˆ์— ๊ฐ€์„œ config.yml์„ ๋ณต์‚ฌํ•œ๋‹ค. Sample Page ๋งŒ๋“ค๊ธฐ --- title: "My 1st post" date: 2020-09-15T11:30:03+00:00 # weight: 1 # aliases: ["/first"] tags: ["first"] author: "Me" # author: ["Me", "You"] # multiple authors showToc: true TocOpen: false draft: false hidemeta: false comments: false description: "Desc Text." canonicalURL: "https://canonical.url/to/page" disableHLJS: true # to disable highlightjs disableShare: false disableHLJS: false hideSummary: false searchHidden: true ShowReadingTime: true ShowBreadCrumbs: true ShowPostNavLinks: true ShowWordCount: true ShowRssButtonInSectionTermList: true UseHugoToc: true cover: image: "<image path/url>" # image path/url alt: "<alt text>" # alt text caption: "<text>" # display caption under cover relative: false # when using page bundles set this to true hidden: true # only hide on current single page editPost: URL: "https://github.com/<path_to_repo>/content" Text: "Suggest Changes" # edit text appendFilePath: true # to append file path to Edit link --- ## This is sample Page Hello World! ํŽ˜์ด์ง€ ์ƒ์„ฑ1: my_site/contents/sample.md๊ฐ€ ๋“ค์–ด๊ฐ„๋‹ค. $ hugo new --kind post sample.md ํŽ˜์ด์ง€ ์ƒ์„ฑ2: my_site/contents/posts/my-first-post.md๊ฐ€ ์ƒ์„ฑ๋œ๋‹ค. $ hugo new posts/my-first-post.md LANGUAGE CODE ์„ค์ • my_site/langcode.yaml ์„ ์ถ”๊ฐ€ํ•˜๊ณ  ์„ค์ •ํ•œ๋‹ค. - id: prev_page translation: "Prev" - id: next_page translation: "Next" - id: read_time translation: one: "1 min" other: "{{ .Count }} min" - id: words translation: one: "word" other: "{{ .Count }} words" - id: toc translation: "Table of Contents" - id: translations translation: "Translations" - id: home translation: "Home" - id: edit_post translation: "Edit" - id: code_copy translation: "copy" - id: code_copied translation: "copied!" Start the Hugo Server ์•„๋ž˜์™€ ๊ฐ™์ด ์„œ๋ฒ„๋ฅผ ์‹คํ–‰ํ•˜๊ณ  ๋ธŒ๋ผ์šฐ์ €์—์„œ http://localhost:1313 ์œผ๋กœ ํ™•์ธ ์‹คํ–‰ ์œ„์น˜๋Š” my_site/ ๋‚ด์—์„œ ํ•ด์•ผํ•œ๋‹ค. $ hugo server -D Links https://cristianpb.github.io/blog/vimwiki-hugo https://gohugo.io/getting-started/quick-start/ https://themes.gohugo.io/themes/hugo-papermod/

2022-08-23 ยท (updated 2022-09-08) ยท 327 words

Vimwiki

2023-08-31: ์˜คํƒ€ ์ˆ˜์ •, ํ• ์ผ๊ณผ ์ผ๊ธฐ ํ•ญ๋ชฉ ๋‚ด์šฉ ์ถ”๊ฐ€ 2023-08-04: nvim์—์„œ์˜ ์„ค์ • ์ถ”๊ฐ€, ์˜คํƒ€ ๋ฐ ๋งํฌ ์ˆ˜์ • 2022-09-12: vimwiki cheatsheet ๋งํฌ ์ถ”๊ฐ€ vim์—์„œ ์„ค์น˜ vim์˜ vimwiki ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ์„ค์ • ์ถ”๊ฐ€ํ•˜๊ณ  ์„ค์น˜ํ•œ๋‹ค. vim ~/.vimrc ์„ค์ • ์ถ”๊ฐ€ ๋‚ด์šฉ "vimwiki ํ”Œ๋Ÿฌ๊ทธ์ธ Plug 'vimwiki/vimwiki', {'branch': 'dev'} "vimwiki์˜ ํŽธํ•œ ์‹œ์ž‘์„ ์œ„ํ•œ vim starter tool Plug 'mhinz/vim-startify' ํ”Œ๋Ÿฌ๊ทธ์ธ ์„ค์น˜ $ vim +PluginInstall +qall vim์—์„œ ์„ค์ • $ vim ~/.vimrc " vimwiki ์„ค์ • " ๊ณต๊ฐœ์šฉ ์œ„ํ‚ค(github์™€ ์—ฐ๋™), ๊ฐœ์ธ์šฉ ์œ„ํ‚ค ๋‘๊ฐœ๋ฅผ ์„ค์ •(gdrive, dropbox ์—ฐ๋™) let g:vimwiki_list = [ \{ \ 'path': '/data/vimwiki/wiki', \ 'syntax' : 'markdown', \ 'ext' : '.md', \ 'diary_rel_path': '.', \}, \{ \ 'path': '/data/vimwiki/mywiki', \ 'ext' : '.md', \ 'diary_rel_path': '.', \}, \] " vimwiki์˜ conceallevel ์„ ๋„๋Š” ๊ฒƒ์ด ์ข‹๋‹ค let g:vimwiki_conceallevel = 0 " vimwiki ์„ค์ •์ด markdown ์„ค์ •์„ ์นจํˆฌํ•˜์ง€ ์•Š๊ฒŒ ํ•˜๊ธฐ let g:vimwiki_global_ext = 0 Neovim์—์„œ ์„ค์น˜ ํ”Œ๋Ÿฌ๊ทธ์ธ ๋“ฑ๋ก: ~/.config/nvim/lua/plugins.lua use {'vimwiki/vimwiki'} ํ”Œ๋Ÿฌ๊ทธ์ธ ์„ค์น˜: nvim ๋‚ด์—์„œ :PackerInstall ํ”Œ๋Ÿฌ๊ทธ์ธ ์„ค์น˜: shell ๋‚ด์—์„œ $ nvim + $ nvim +PluginInstall +qall Neovim์—์„œ ์„ค์ • ์„ค์ •: ~/.config/nvim/lua/settings.lua -- vimwiki - https://github.com/vimwiki/vimwiki ---------------------------------------------------------------- vim.cmd([[ iabbr __email abcd@efgh.com iabbr <expr> __time strftime("%Y-%m-%d %H:%M:%S") iabbr <expr> __date strftime("%FT%R:%S+09:00") iabbr <expr> __today strftime("%F") iabbr <expr> __file expand('%:p') iabbr <expr> __name expand('%') iabbr <expr> __pwd expand('%:p:h') iabbr <expr> __front system("/home/borisu/bin/frontmatter.sh") iabbr <expr> __luajit '#!/usr/bin/env luajit' ]]) -- Key Mapping nmap('<C-l>', ':VimwikiToggleListItem<CR>') -- Contol + Space is default -- vim.g.vimwiki_autowriteall = true -- automatically save a modified wiki buffer -- vimwiki์˜ conceallevel ์„ ๋” vim.g.vimwiki_conceallevel = 0 -- vimwiki ์„ค์ •์ด markdown ์„ค์ •์„ ์นจํˆฌํ•˜์ง€ ์•Š๊ฒŒ ํ•˜๊ธฐ vim.g.vimwiki_global_ext = 0 -- ๋ชจ๋“  ๋งˆํฌ๋‹ค์šด์— ๋Œ€ํ•ด ๋™์ž‘ํ•˜์ง€ ์•Š๋„๋ก ํ•จ vim.g.vimwiki_list = { { path = '$HOME/vimwiki/', syntax = 'markdown', ext = '.md', diary_rel_path = '.', } } ์žฌ์ธ์‹ :luafile % -- ๋˜๋Š” :so % ๊ธฐ๋ณธ ํ‚ค์ •์˜ :h vimwiki-local-mappings โ€“ See default key binding ...

2022-08-23 ยท (updated 2023-09-01) ยท 593 words