Openresty - Scalable Web Platform NGINX with Lua

INTRO openresty๋Š” nginx์™€ lua ๊ธฐ๋ฐ˜์˜ ์›น๊ฐœ๋ฐœ ํ”Œ๋žซํผ์ด๋‹ค. lua๋Š” luajit ์„ ์‚ฌ์šฉํ•˜๊ณ  ์—”์ง„์ด ํฌํ•จ๋˜์–ด ์žˆ๋‹ค. ์„œ๋ฒ„์—์„œ ๋™์ž‘ํ•œ๋‹ค. ๋Œ€๋ถ€๋ถ„์˜ ๋ฆฌ๋ˆ…์Šค ๋ฐฐํฌํŒ์€ ํŒจํ‚ค์ง€๋ฅผ ์ง€์›ํ•œ๋‹ค. ์—ฌ๊ธฐ์—์„œ๋Š” docker ์ด๋ฏธ์ง€๋กœ ์„ค์น˜ํ•˜๊ณ  ์‚ฌ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์ •๋ฆฌํ•œ๋‹ค. System Info: RaspberryPi 3 Model B Rev 1.2 OS: Raspbian (Debian 11, Bullseye) Docker: version 24.0.5 Getting Started Hello World # Install Docker and Relogin after exit curl -sSL https://get.docker.com | sh sudo usermod -aG docker $usermod exit ... docker run hello-world # Docker Image get docker pull openresty/openresty:alpine # Setup mkdir ~/www cd ~/www mkdir conf html vi conf/nginx.conf ... worker_processes 1; error_log error.log; events { worker_connections 1024; } http { server { listen 8000; location / { default_type text/html; content_by_lua ' ngx.say("<p>hello world!</p>") '; } } } ... # Run openresty docker image docker run --name mresty --rm --volume `pwd`/conf/:/usr/local/openresty/nginx/conf/ \ -p 127.0.0.1:8000:8000 openresty/openresty:alpine # docker process check docker ps # openresty web server test curl localhost:8000 <p>hello world!</p> Openresty Comandline Utility # version check resty -v # Hello World resty -e 'print("Hello World")' echo 'print("Hello World")' > hello.lua resty hello.lua # resty ngx module test time resty -e 'gnx.sleep(1) ngx.say("done")' resty -e 'local sock = ngx.socket.tcp() print(socke:connect("openresty.com",443))' resty -e 'ngx.thread.wait(ngx.thread.spawn(function () print("in thread!") end))' mkdir lua/ vim lua/test.lua ... local _M = {} function _M.hello() print("Hello") end return _M ... resty -e 'require "test".hello()' # Error resty -I lua/ -e 'require "test".hello()' # Hello resty -e 'local ok, stdout = require "resty.shell".run([[echo ok]]) print(stdout)' # ok resty --shdict 'dogs 10m' -e 'print(ngx.shared.dogs:set("age",11))' # truenilfalse resty --shdict 'dogs 7m' --shdict 'cats 5m' -e 'print(ngx.shared.dogs, " ", ngx.shared.cats)' resty --http-conf 'lua_regex_match_limit 102400;' -e 'print "ok"' # Bench Test echo 'local a = 0 for 1, 1e8 do a = a+1 end print(a)' > bench.lua time resty -joff bench.lua # without Jit Compiler time resty bench.lua # with Jit Compiler (Fast) resty -jv bench.lua resty -jdump bench.lua | less # Help resty -h | less # See Help restydoc resty-cli # See Document Structure and Lua Module Create Project Folder and Modules mkdir test-module cd test-module mkdir logs conf lua vim lua/hello.lua ... local _M = {} function _M.greet(name) ngx.say("Greetings from ", name) end return _M ... Setup nginx.conf vim conf/nginx.conf ... worker_processes 1; events { worker_connections 1024; } http { # Lua module Preload for performance and Cache init_by_lua_block { require "hello" } # add module path to lua package path: $prefix means nginx -p option value lua_package_path "$prefix/lua/?.lua;;" # Server Setup: port, lua block... server { listen 8080 reuseport; location / { content_by_lua_block { local hello = require "hello" hello.greet("a Lua module") } } } } ... Server start and Test # server configuration test nginx -p $PWD/ -t # server start nginx -p $PWD/ # Chech Error Log tail logs/error.log # client request test : Browser also available curl 'http://127.0.0.1:8080' Greetins from a Lua module Server Admin # check server process ps aux | grep nginx | grep -v /tmp/ pgrep -l nginx # Edit nginx.conf vim conf/nginx.conf # Server Restart (After editting of nginx.conf) kill -HUP `cat logs/nginx.pid` # client request again curl 'http://127.0.0.1:8080' Build Develop Environment Makefile์„ ๋งŒ๋“ค๊ณ  ๋„์ปค์ด๋ฏธ์ง€๋ฅผ ์ œ์–ดํ•˜๊ณ  ๋กœ๊ทธ ๋“ฑ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋Š” ํ™˜๊ฒฝ์„ ๋งŒ๋“ ๋‹ค. Makefile conf/nginx.conf Test REFERENCE awesome-resty - https://github.com/bungle/awesome-resty ...

2023-09-16 ยท (updated 2023-09-27) ยท 566 words

Edge - ์œˆ๋„์šฐ์ฆˆ ๋ธŒ๋ผ์šฐ์ €

์ด๊ฒƒ์„ ์‚ฌ์šฉํ•˜๋Š” ์ด์œ ๋Š” ์–ด์ฉ” ์ˆ˜ ์—†์ด ๊ด€๊ณต์„œ๋‚˜ ๊ธˆ์œต๊ถŒ ๋•Œ๋ฌธ์ด๋‹ค. ํ•œ๊ตญ์˜ ํ›„์ง„์ ์ธ ๊ณต์ธ์ธ์ฆ์„œ์ œ๋„์™€ ์œˆ๋„์šฐ์ฆˆ ์ค‘์‹ฌ ์‚ฌ์šฉ์œผ๋กœ ์ธํ•œ ํํ•ด๊ฐ€ ์•„๋‹๊นŒ ํ•œ๋‹ค. ๋‹คํฌ๋ชจ๋“œ Dark mode ๋ณ€๊ฒฝ ๋ชจ์–‘๋ณ€๊ฒฝ: ์„ค์ • > ๋ธŒ๋ผ์šฐ์ € ๋””์Šคํ”Œ๋ ˆ์ด> ๋ชจ์–‘ ์‚ฌ์šฉ์ž ์ง€์ • > ์–ด๋‘ก๊ฒŒ ์›นํŽ˜์ด์ง€๋ณ€๊ฒฝ: ๋ธŒ๋ผ์šฐ์ € ์ฐฝ์— ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์ž…๋ ฅ ํ›„ ์žฌ์‹คํ–‰ edge://flags/#enable-force-dark

2023-09-08 ยท 42 words

Lynx - ํ„ฐ๋ฏธ๋„ ํ…์ŠคํŠธ ๋ธŒ๋ผ์šฐ์ €

INTRO ์˜ˆ์ „์— ํ„ฐ๋ฏธ๋„ ์ƒ์—์„œ ์›น๋ฌธ์„œ๋ฅผ ์ฐธ๊ณ ํ•˜๊ธฐ ์œ„ํ•ด ์‚ฌ์šฉ. ํ˜„์žฌ utf-8์ง€์› ๋ฐ ์ปฌ๋Ÿฌ ์ง€์›, vi key binding ์ง€์› ๋“ฑ ๋‹ค์–‘ํ•œ ๊ธฐ๋Šฅ ๋ณด์œ . ๊ด‘๊ณ ๋‚˜ ํ˜„๋ž€ํ•œ ๊ทธ๋ฆผ๋“ค, ๊ทธ๋ฆฌ๊ณ  ํ•˜์–€ ํ™”๋ฉด์œผ๋กœ๋ถ€ํ„ฐ ๋ˆˆ์„ ๋ณดํ˜ธํ•˜์ž. ๊ธฐ์ˆ ๋ฌธ์„œ๋‚˜ ์‹ ๋ฌธ๊ธฐ์‚ฌ ๋˜๋Š” ๋ฌธ์„œ ์œ„์ฃผ์˜ ์ž‘์—…์„ ์ฃผ๋กœ ํ•  ๋•Œ ๋น ๋ฅด๊ณ  ๊ฐ„๊ฒฐ. CPU์™€ MEMORY๋ฅผ ํƒ€ ๋ธŒ๋ผ์šฐ์ € ๋ณด๋‹ค ์ ๊ฒŒ ์‚ฌ์šฉํ•˜๋Š” ๊ทธ์•ผ๋ง๋กœ ์นœํ™˜๊ฒฝ ๋ธŒ๋ผ์šฐ์ €. tmux์—์„œ vim๊ณผ ํ•จ๊ป˜ ์‚ฌ์šฉํ•˜๋ฉด ํ™˜์ƒ์˜ ๊ถํ•ฉ์ด๋ผ ๋งํ•  ์ˆ˜ ์žˆ๊ฒ ๋‹ค. INSTALL Debian, Ubuntu $ sudo apt install lynx $ lynx --version $ lynx duckduckgo.com Alpine $ doas apk add lynx SETUP Vi Key ์„ค์ • - ํ™”๋ฉด ์ด๋™์„ hjkl๋กœ ๋ณ€๊ฒฝ 1. ์‹คํ–‰ ํ›„ `o` ๋ช…๋ น์œผ๋กœ ์˜ต์…˜ ์„ค์ • 2. VI keys -> [ON] ์œผ๋กœ 3. Line edit style -> [Bash-like Bindings] ๋กœ ์„ค์ • 4. ํ™”๋ฉด ์ƒ๋‹จ์— Save options to disk: [x] ํ‘œ์‹œ 5. ํ™”๋ฉด ๊ฐ€์žฅ ์œ—์ค„์— Accept Changes ํด๋ฆญ Usage ํ™”์‚ดํ‚ค <- ์ด์ „ ์›นํŽ˜์ด์ง€๋กœ ์ด๋™ ํ™”์‚ดํ‚ค -> ์ดํ›„ ์›นํŽ˜์ด์ง€๋กœ ์ด๋™ ํ™”์‚ดํ‚ค up ํŽ˜์ด์ง€ ์ƒ๋‹จ์œผ๋กœ ์ด๋™ ํ™”์‚ดํ‚ค down ํŽ˜์ด์ง€ ํ•˜๋‹จ์œผ๋กœ ์ด๋™ h ๋„์›€๋ง o ์˜ต์…˜ p ํ”„๋ฆฐํŠธ g ์ž…๋ ฅํ•œ ์‚ฌ์ดํŠธ๋กœ ์ด๋™ m ๋ฉ”์ธ์œผ๋กœ q ์ข…๋ฃŒ /= ๊ฒ€์ƒ‰ delete= ํžˆ์Šคํ† ๋ฆฌ ๋ฆฌ์ŠคํŠธ Links tmux home: https://lynx.browser.org

2022-12-18 ยท 170 words

PaperMod - Hugo Theme

TODO ์•„์ด์ฝ˜ ํ‘œ์‹œ ๋ฐ ๊ตฌ์กฐ ํŒŒ์•…ํ•ด์„œ ์ด๋ฅผ ์ ์šฉํ•˜๊ธฐ 2022-09-08 - ๋‚ด์šฉ ์ˆ˜์ •, ๊ทธ๋ฆผํŒŒ์ผ ๋งํฌ ๊ด€๋ จ ์ถ”๊ฐ€ PaperMod screen shot Intro hugo์˜ ํ…Œ๋งˆ ์ค‘์— ๊ฐ€์žฅ ๊ฐ„๊ฒฐํ•˜๊ณ  ์•ˆ์ •์ ์ด๋ฉฐ ๋งŽ์€ ์‚ฌ๋žŒ๋“ค์ด ์‚ฌ์šฉํ•˜๊ณ  ์žˆ๋‹ค. hugo ํ”„๋กœ์ ํŠธ๋Š” ~/www๋กœ ๊ฐ€์ •ํ•œ๋‹ค. ์ฃผ์˜ํ•  ๊ฒƒ์€ hugo์˜ ๊ตฌ์กฐ๊ฐ€ ~/www/contents/์ดํ•˜์— markdown ํŒŒ์ผ์„ ๋„ฃ์–ด์ฃผ์–ด์•ผ ํ•˜๊ณ , ์ดํ•˜ ํด๋”๋Š” ์ ์ ˆํžˆ ๋งŒ๋“ค๋˜ index.mdํŒŒ์ผ์€ ๋งŒ๋“ค๋ฉด ์›นํŽ˜์ด์ง€ ๋ฉ”์ธ ํ™”๋ฉด์— ๋‚ด์šฉ์ด ๋œจ์งˆ ์•Š๋Š”๋‹ค๋Š” ์ ์ด๋‹ค. ์„ค์ •์€ ~/www/config.yml์ด๋‹ค. ์„ค์ •์„ ๋ณ€๊ฒฝํ•˜๋ฉด hugo -D server ๋™์ž‘์‹œ ์ž๋™์œผ๋กœ ๋ฐ˜์˜๋œ๋‹ค. ๋งŒ์•ฝ ์„ค์ • ๋ณ€๊ฒฝ ์‚ฌํ•ญ์ด ๋ธŒ๋ผ์šฐ์ €์—์„œ ๋ณด์ด์ง€ ์•Š์œผ๋ฉด ์„œ๋ฒ„๋ฅผ ์žฌ์‹คํ–‰ ํ•œ๋‹ค. Install and Update Install $ cd ~/www $ git clone https://github.com/adityatelange/hugo-PaperMod themes/PaperMod --depth=1 Update $ cd themes/PaperMod $ git pull Setup ๊ด€๋ จ ๋งํฌ ์•„๋ž˜ ์‚ฌ์ดํŠธ์— config.yml ๋ฐ post.md ์ƒ˜ํ”Œ์ด ์žˆ์œผ๋‹ˆ ์ฐธ๊ณ ํ•œ๋‹ค. https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-installation/ ํ…Œ๋งˆ ์„ค์ • papermod ์˜ ํ…Œ๋งˆ๋Š” light/dark/auto ๊ฐ€ ์žˆ๋‹ค. ํ™ˆํ™”๋ฉด ์ขŒ์ธก ์ƒ๋‹จ์— ํ•ด/๋‹ฌ ์•„์ด์ฝ˜ ํด๋ฆญ baseURL: "https://your_idname.github.io/" # ์ž์‹ ์˜ ๊นƒํŽ˜์ด์ง€ URL title: My Blog and wiki # ๋ธ”๋กœ๊ทธํ™ˆ ์ œ๋ชฉ paginate: 5 # ํ™ˆ์—์„œ ๋ณด์—ฌ์ค„ ๋ธ”๋กœ๊ทธ ํ‘œ์‹œ ๊ฐฏ์ˆ˜ theme: "PaperMod" # ํ…Œ๋งˆ PaperMod๋กœ ์ง€์ • params: # defaultTheme: light # defaultTheme: light defaultTheme: auto # auto๋กœ ์„ค์ •ํ•˜๋ฉด ์‚ฌ์šฉ์ž๊ฐ€ ๋ฐ”๊ฟ€ ์ˆ˜ ์žˆ๋‹ค. # disableThemeToggle: true # ํ•ด/๋‹ฌ ์•„์ด์ฝ˜์„ ๋ณด์ด์ง€ ์•Š๊ฒŒ ํ•˜๊ธฐ ๋ฉ”๋‰ด์„ค์ • ํ™ˆ ์šฐ์ธก ์ƒ๋‹จ ๋ฉ”๋‰ด๋ฅผ ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์ถ”๊ฐ€ํ•œ๋‹ค. menu: main: - identifier: categories # ๋ธ”๋กœ๊ทธ ์นดํ…Œ๊ณ ๋ฆฌ ๋ฉ”๋‰ด name: categories url: /categories/ weight: 10 - identifier: search # ๋ธ”๋กœ๊ทธ ๊ฒ€์ƒ‰ ๋ฉ”๋‰ด name: Search url: /search weight: 30 - identifier: tags # ๋ธ”๋กœ๊ทธ ํƒœ๊ทธ ๋ฉ”๋‰ด name: tags url: /tags/ weight: 20 - identifier: archives # ๋ธ”๋กœ๊ทธ ํƒœ๊ทธ ๋ฉ”๋‰ด name: tags url: /tags/ weight: 20 Archive Page - ์•„์นด์ด๋ธŒ ํŽ˜์ด์ง€, ๋‚ ์งœ๋ณ„๋กœ ์˜ฌ๋ฆฐ ํฌ์ŠคํŠธ๋ฌธ์„œ๊ฐ€ ์ •๋ฆฌ๋จ $ cat << EOF > ~/www/content/archives.md --- title: "Archive" layout: "archives" # url: "/archives" summary: "archives" --- EOF Search Page - ๊ฒ€์ƒ‰ํŽ˜์ด์ง€, ํผ์ง€ ์Šคํƒ€์ผ์˜ ๋น ๋ฅธ ๊ฒ€์ƒ‰ $ cat << EOF > ~/www/content/search.md --- title: "Search" # in any language you want layout: "search" # is necessary # url: "/archive" # description: "Description for Search" summary: "search" placeholder: "๊ฒ€์ƒ‰์–ด๋ฅผ ์ž…๋ ฅํ•˜์„ธ์š”" --- EOF tags์™€ categories๋Š” ์˜ฌ๋ฆด ํฌ์ŠคํŠธ๋ฌธ์„œ post.md ๋“ฑ์˜ frontmatter์— ๊ธฐ๋กํ•˜๋ฉด ์ž๋™์œผ๋กœ ๋ถ„๋ฅ˜๋˜๊ณ  ํ™ˆ ์ƒ๋‹จ ๋ฉ”๋‰ด์—์„œ ๋ณผ ์ˆ˜ ์žˆ๋‹ค. Post Cover Image ~/www/config.yml์— ์„ค์ •ํ•ด์ฃผ๊ณ  ์•„๋ž˜ ์„ค๋ช…๋Œ€๋กœ ํฌ์ŠคํŠธ๋ฌธ์„œ์— ๋งํฌ๋ฅผ ๊ฑธ์–ด์ฃผ๋ฉด ๋œ๋‹ค. cover: image: "<image path/url>" # can also paste direct link from external site # ex. https://i.ibb.co/K0HVPBd/paper-mod-profilemode.png alt: "<alt text>" caption: "<text>" relative: false # To use relative path for cover image, used in hugo Page-bundles ์ด๋ฏธ์ง€ ์‚ฌ์ด์ฆˆ๋ฅผ ์ค„์ด๊ณ  ์ฒ˜๋ฆฌ์†๋„๋ฅผ ๋†’์ด๋ ค๋ฉด ์•„๋ž˜ ์„ค์ • ์ถ”๊ฐ€ params: cover: responsiveImages: false ๊ทธ๋Ÿฌ๋‚˜ ์‹ค์ œ๋กœ ์ ์šฉํ•ด๋„ ํŽ˜์ด์ง€๋Š” ๋ณ€ํ™”ํ•˜์ง€ ์•Š๋Š”๋‹ค. ...

2022-08-24 ยท (updated 2025-06-15) ยท 701 words

PaperMod - Hugo Theme

History 2025-06-27 - tip ์ถ”๊ฐ€: tags, categories list์— cover image ํ‘œ์‹œํ•˜๊ธฐ 2022-09-08 - ๋‚ด์šฉ ์ˆ˜์ •, ๊ทธ๋ฆผํŒŒ์ผ ๋งํฌ ๊ด€๋ จ ์ถ”๊ฐ€ PaperMod screen shot Intro hugo์˜ ํ…Œ๋งˆ ์ค‘์— ๊ฐ€์žฅ ๊ฐ„๊ฒฐํ•˜๊ณ  ์•ˆ์ •์ ์ด๋ฉฐ ๋งŽ์€ ์‚ฌ๋žŒ๋“ค์ด ์‚ฌ์šฉํ•˜๊ณ  ์žˆ๋‹ค. hugo ํ”„๋กœ์ ํŠธ๋Š” ~/www๋กœ ๊ฐ€์ •ํ•œ๋‹ค. ์ฃผ์˜ํ•  ๊ฒƒ์€ hugo์˜ ๊ตฌ์กฐ๊ฐ€ ~/www/contents/์ดํ•˜์— markdown ํŒŒ์ผ์„ ๋„ฃ์–ด์ฃผ์–ด์•ผ ํ•˜๊ณ , ์ดํ•˜ ํด๋”๋Š” ์ ์ ˆํžˆ ๋งŒ๋“ค๋˜ index.mdํŒŒ์ผ์€ ๋งŒ๋“ค๋ฉด ์›นํŽ˜์ด์ง€ ๋ฉ”์ธ ํ™”๋ฉด์— ๋‚ด์šฉ์ด ๋œจ์งˆ ์•Š๋Š”๋‹ค๋Š” ์ ์ด๋‹ค. ์„ค์ •์€ ~/www/config.yml์ด๋‹ค. ์„ค์ •์„ ๋ณ€๊ฒฝํ•˜๋ฉด hugo -D server ๋™์ž‘์‹œ ์ž๋™์œผ๋กœ ๋ฐ˜์˜๋œ๋‹ค. ๋งŒ์•ฝ ์„ค์ • ๋ณ€๊ฒฝ ์‚ฌํ•ญ์ด ๋ธŒ๋ผ์šฐ์ €์—์„œ ๋ณด์ด์ง€ ์•Š์œผ๋ฉด ์„œ๋ฒ„๋ฅผ ์žฌ์‹คํ–‰ ํ•œ๋‹ค. Install and Update Install $ cd ~/www $ git clone https://github.com/adityatelange/hugo-PaperMod themes/PaperMod --depth=1 Update $ cd themes/PaperMod $ git pull Setup ๊ด€๋ จ ๋งํฌ ์•„๋ž˜ ์‚ฌ์ดํŠธ์— config.yml ๋ฐ post.md ์ƒ˜ํ”Œ์ด ์žˆ์œผ๋‹ˆ ์ฐธ๊ณ ํ•œ๋‹ค. https://adityatelange.github.io/hugo-PaperMod/posts/papermod/papermod-installation/ ํ…Œ๋งˆ ์„ค์ • papermod ์˜ ํ…Œ๋งˆ๋Š” light/dark/auto ๊ฐ€ ์žˆ๋‹ค. ํ™ˆํ™”๋ฉด ์ขŒ์ธก ์ƒ๋‹จ์— ํ•ด/๋‹ฌ ์•„์ด์ฝ˜ ํด๋ฆญ baseURL: "https://your_idname.github.io/" # ์ž์‹ ์˜ ๊นƒํŽ˜์ด์ง€ URL title: My Blog and wiki # ๋ธ”๋กœ๊ทธํ™ˆ ์ œ๋ชฉ paginate: 5 # ํ™ˆ์—์„œ ๋ณด์—ฌ์ค„ ๋ธ”๋กœ๊ทธ ํ‘œ์‹œ ๊ฐฏ์ˆ˜ theme: "PaperMod" # ํ…Œ๋งˆ PaperMod๋กœ ์ง€์ • params: # defaultTheme: light # defaultTheme: light defaultTheme: auto # auto๋กœ ์„ค์ •ํ•˜๋ฉด ์‚ฌ์šฉ์ž๊ฐ€ ๋ฐ”๊ฟ€ ์ˆ˜ ์žˆ๋‹ค. # disableThemeToggle: true # ํ•ด/๋‹ฌ ์•„์ด์ฝ˜์„ ๋ณด์ด์ง€ ์•Š๊ฒŒ ํ•˜๊ธฐ ๋ฉ”๋‰ด์„ค์ • ํ™ˆ ์šฐ์ธก ์ƒ๋‹จ ๋ฉ”๋‰ด๋ฅผ ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์ถ”๊ฐ€ํ•œ๋‹ค. menu: main: - identifier: categories # ๋ธ”๋กœ๊ทธ ์นดํ…Œ๊ณ ๋ฆฌ ๋ฉ”๋‰ด name: categories url: /categories/ weight: 10 - identifier: search # ๋ธ”๋กœ๊ทธ ๊ฒ€์ƒ‰ ๋ฉ”๋‰ด name: Search url: /search weight: 30 - identifier: tags # ๋ธ”๋กœ๊ทธ ํƒœ๊ทธ ๋ฉ”๋‰ด name: tags url: /tags/ weight: 20 - identifier: archives # ๋ธ”๋กœ๊ทธ ํƒœ๊ทธ ๋ฉ”๋‰ด name: tags url: /tags/ weight: 20 Archive Page - ์•„์นด์ด๋ธŒ ํŽ˜์ด์ง€, ๋‚ ์งœ๋ณ„๋กœ ์˜ฌ๋ฆฐ ํฌ์ŠคํŠธ๋ฌธ์„œ๊ฐ€ ์ •๋ฆฌ๋จ $ cat << EOF > ~/www/content/archives.md --- title: "Archive" layout: "archives" # url: "/archives" summary: "archives" --- EOF Search Page - ๊ฒ€์ƒ‰ํŽ˜์ด์ง€, ํผ์ง€ ์Šคํƒ€์ผ์˜ ๋น ๋ฅธ ๊ฒ€์ƒ‰ $ cat << EOF > ~/www/content/search.md --- title: "Search" # in any language you want layout: "search" # is necessary # url: "/archive" # description: "Description for Search" summary: "search" placeholder: "๊ฒ€์ƒ‰์–ด๋ฅผ ์ž…๋ ฅํ•˜์„ธ์š”" --- EOF tags์™€ categories๋Š” ์˜ฌ๋ฆด ํฌ์ŠคํŠธ๋ฌธ์„œ post.md ๋“ฑ์˜ frontmatter์— ๊ธฐ๋กํ•˜๋ฉด ์ž๋™์œผ๋กœ ๋ถ„๋ฅ˜๋˜๊ณ  ํ™ˆ ์ƒ๋‹จ ๋ฉ”๋‰ด์—์„œ ๋ณผ ์ˆ˜ ์žˆ๋‹ค. Post Cover Image ~/www/config.yml์— ์„ค์ •ํ•ด์ฃผ๊ณ  ์•„๋ž˜ ์„ค๋ช…๋Œ€๋กœ ํฌ์ŠคํŠธ๋ฌธ์„œ์— ๋งํฌ๋ฅผ ๊ฑธ์–ด์ฃผ๋ฉด ๋œ๋‹ค. cover: image: "<image path/url>" # can also paste direct link from external site # ex. https://i.ibb.co/K0HVPBd/paper-mod-profilemode.png alt: "<alt text>" caption: "<text>" relative: false # To use relative path for cover image, used in hugo Page-bundles ์ด๋ฏธ์ง€ ์‚ฌ์ด์ฆˆ๋ฅผ ์ค„์ด๊ณ  ์ฒ˜๋ฆฌ์†๋„๋ฅผ ๋†’์ด๋ ค๋ฉด ์•„๋ž˜ ์„ค์ • ์ถ”๊ฐ€ params: cover: responsiveImages: false ๊ทธ๋Ÿฌ๋‚˜ ์‹ค์ œ๋กœ ์ ์šฉํ•ด๋„ ํŽ˜์ด์ง€๋Š” ๋ณ€ํ™”ํ•˜์ง€ ์•Š๋Š”๋‹ค. ...

2022-08-24 ยท (updated 2025-06-27) ยท 864 words