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 ๊ทธ๋ฌ๋ ์ค์ ๋ก ์ ์ฉํด๋ ํ์ด์ง๋ ๋ณํํ์ง ์๋๋ค. ...