# Zzo theme for Hugo [English](https://github.com/zzossig/hugo-theme-zzo/blob/master/README.md) | ํ๊ตญ์ด ๐ฅ๐ฅ๐ฅ๐ค์ต์๋ก ์ง์๊ฐ๋ฅํ Hugo ๋ฒ์ ์ด 0.60.0์ผ๋ก ๋ณ๊ฒฝ๋์์ต๋๋ค. ์ด์ ๋ฒ์ ๊ณผ๋ ๋ค๋ฅด๊ฒ ์์ ๋งํฌ๋ค์ด ๋ ๋๋ง ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์์ฒด๊ฐ ๋ณ๊ฒฝ๋์ด(blackfridy์์ goldmark๋ก), ํน์ฌ ์ด์ ๋ฒ์ ์ ์ฌ์ฉํ๊ณ ๊ณ์๋ค๋ฉด, ์ต์ Hugo ๋ฒ์ ์ ์ค์นํ์๋๊ฑธ ๊ถ์ฅ๋๋ฆฝ๋๋ค.๐ฅ๐ฅ๐ฅ ํด๋ฆญํด ์ฃผ์ ์ ๊ฐ์ฌํฉ๋๋ค. Zzo theme์ ๋ง์ ๊ธฐ๋ฅ์ ์ง์ํ๊ณ ์๊ณ ์์ต๋๋ค. ๊ธฐ์ ๋ธ๋ก๊ทธ๋ฅผ ์ด์ํ๊ธฐ์ ์ต์ ํ ๋์ด์์ต๋๋ค!(์ ์ด๋ ์ ์๊ฐ์...) Zzo theme์ ์ด์ฉํ ์ ๊ฐ์ฅ ๋งค๋ ฅ์ ์ธ ํฌ์ธํธ ํ๊ฐ์ง๋, ํ๊ธ๋ก ์ ์ ์ํตํ ์ ์๋ค๋ ์ ? ์ ๋๋ค. ## Table of contents * [๊ธฐ๋ฅ](#features) * [์ต์ ํด๊ณ ๋ฒ์ ](#minimum-hugo-version) * [์ค์น](#installation) * [์ ๋ฐ์ดํธ](#updating) * [์์ ์ฌ์ดํธ ๋๋ฆฌ๊ธฐ](#run-example-site) * [์ค์ ](#configuration) * [๋ ์ด์์](#layout) * [๊ฐค๋ฌ๋ฆฌ](#gallery) * [์ปจํ ํ์ด์ง](#contact-page) * [๋ค๊ตญ์ด](#multi-language) * [์ปค์คํฐ๋ง์ด์ง](#customizing) * [์ธ๋ถ ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์ฌ์ฉ](#external-library) * [Shortcodes](#shortcodes) ## Features * ๋ค์ํ ์คํจ ์ง์(dark, light, solarized, hacker) * ๋ชจ๋ฐ์ผ ๋ฉ๋ด * ์ต์ HTML5, CSS ๊ธฐ์ ์ด์ฉ * ์ฌํํ ๋ธ๋ก๊ทธ * ๊ฒ์ ์์ง ์ต์ ํ (SEO) * ๋ค๊ตญ์ด ์ง์ (i18n) * ๋ฐ์ํ ๋์์ธ * RSS feed ์ง์ * ๊ฒ์ (์ง์ ์์ ) * ๊ฐค๋ฌ๋ฆฌ ์ง์ * ์ฝ๋ ํ์ด๋ผ์ดํธ ## Minimum Hugo version ์ต์ ์๊ตฌ Hugo ๋ฒ์ ์ 0.60.0 ์ ๋๋ค. ## Installation ์ฐ์ ์ค์ ํ์ผ์ ๋ง๋์ ์ผ ํฉ๋๋ค. ์ค์ ํ์ผ์ด ์๊ฑฐ๋ ์ค์ ๊ฐ์ด ์๋ชป ๋ ๊ฒฝ์ฐ, ์คํ์ด ์๋์ค ์ ์์ต๋๋ค. [์ค์ ](#configuration) ๋งํฌ๋ฅผ ์ฐธ์กฐํ์ฌ ์ค์ ํ์ผ์ ๋ง๋ค์ด์ฃผ์ธ์. ์ค์ ํ์ผ์ ๋ค ๋ง๋์ จ์ผ๋ฉด, theme ํด๋์ zzo ํด๋๋ฅผ ๋ง๋ค๊ณ , ๊ทธ๊ณณ์ ์ด ๋ ํฌ์งํ ๋ฆฌ๋ฅผ ๋ค์ด๋ก๋ ํ์ ํ์ผ์ ๋ณต์ฌ ๋ถ์ฌ๋ฃ๊ธฐ ํ์๋ฉด ๋ฉ๋๋ค. ์ด๋ ๊ฒ ํ์ผ์ ๋ณต์ฌ ๋ถ์ฌ๋ฃ๊ธฐ ํ์๋ฉด, ๋์ค์ ์ ๊ฐ ์ฌ๋ฌ๊ฐ์ง ๋ฒ๊ทธ๋ ์ด์๋ฅผ ์ ๋ฐ์ดํธ ํ์ ๋, ๋์ด ๋ง๋์ ๋ธ๋ก๊ทธ๋ฅผ ์ต์ Zzo theme์ผ๋ก ์ ๋ฐ์ดํธ ํ๊ณ ์ถ์ผ์๋ฉด ํด๋น Zzo theme์ ์ง์ฐ๊ณ ๋ค์ ๋ค์ด๋ก๋ ํ ๋ค์, ๋ณต๋ถํ์๋ฉด ๋๊ฒ ์ต๋๋ค. ```bash $ git clone https://github.com/zzossig/hugo-theme-zzo.git themes/zzo ``` ๊นํ์ ์ด์ฉํ์ฌ ๋ธ๋ก๊ทธ๋ฅผ ๊ด๋ฆฌํ์ ๋ค๋ฉด, ์ญ๋ชจ๋์ ์ฌ์ฉํ์ฌ Zzo theme์ ์ฝ๊ฒ ์ต์ ๋ฒ์ ์ผ๋ก ์ ์งํ์ค ์ ์์ต๋๋ค. ๋ฃจํธ ํด๋์์ ๋ค์ ์ฝ๋๋ฅผ ์ ๋ ฅํด์ฃผ์๋ฉด submodule๋ก์จ Zzo theme์ด ์ค์น๋ฉ๋๋ค: ```bash git submodule add https://github.com/zzossig/hugo-theme-zzo.git themes/zzo ``` ## Updating From the root of your site: ```bash git submodule update --remote --merge ``` ## Run example site From the root of themes/zzo/exampleSite: ```bash hugo server --themesDir ../.. ``` ## Configuration 0. ์ ๊ฐ์ ๊ฒฝ์ฐ, ๋๋ ํ ๋ฆฌ ํ๋๋ฅผ ๋ง๋ค๊ณ ๊ทธ๊ณณ์ ๋ค์๊ณผ๊ฐ์ด ์ฌ์ดํธ๋ฅผ ๋ง๋ญ๋๋ค. ```bash hugo new site . ``` 1. 0๋ฒ ๋จ๊ณ์์ ๋ง๋์ ๋๋ ํ ๋ฆฌ๋ก ๋ค์ด๊ฐ์ฃผ์ธ์. config.toml ํ์ผ์ด ๋ณด์ด์ ๋ค๋ฉด, ๊ณผ๊ฐํ๊ฒ ์ง์์ฃผ์ธ์. ์๋ ๋จ๊ณ๋ค์ ์ ๊ฐ ์ฌ์ฉํ๋ config ํ์ผ๋ค์ ๋๋ค. ๋ชจ๋ ๊ทธ๋ฅ ๋ณต์ฌ, ๋ถ์ฌ๋ฃ๊ธฐ ํด์ ํ์ผ์ ๋ง๋์๋ฉด ๋๋๋ฐ, ๊ท์ฐฎ์ผ์ ๋ถ๋ค์ exampleSite ํด๋์ ์๋ config ํด๋๋ฅผ ๋ฃจํธ ๋๋ ํ ๋ฆฌ์ ๊ทธ๋ฅ ๋ณต์ฌ ๋ถ์ฌ๋ฃ๊ธฐ ํ์ ๋ ๋ฉ๋๋ค. ์๋๋ ์ค์ ํ์ผ ๊ตฌ์กฐ๊ตฌ์. ```bash root โโโ config โย ย โโโ _default โย ย โย ย โโโ config.toml โย ย โย ย โโโ languages.toml โย ย โย ย โโโ menus.en.toml โย ย โย ย โโโ params.toml ``` 2. config.toml ```bash baseURL = "http://example.org/" # The URL of your site. title = "Hugo Zzo Theme" # Title of your site theme = "zzo" # Name of Zzo theme folder in `themes/`. defaultContentLanguage = "en" # Default language to use (if you setup multilingual) defaultContentLanguageInSubdir = true # baseURL/en/, baseURL/kr/ ... hasCJKLanguage = true # Set `true` for Chinese/Japanese/Korean languages. summaryLength = 70 # The length of a post description on a list page. copyright = "ยฉ{year}, All Rights Reserved" # copyright symbol: $copy; current year: {year} timeout = 10000 enableEmoji = true paginate = 13 # Number of items per page in paginated lists. rssLimit = 100 enableGitInfo = false # When true, the modified date will appear on a summary and single page. Since GitHub info needs to be fetched, this feature will slow down to build depending on a page number you have googleAnalytics = "" [markup] [markup.goldmark] [markup.goldmark.renderer] hardWraps = true unsafe = true xHTML = true [markup.highlight] codeFences = true lineNos = true lineNumbersInTable = true noClasses = false [outputs] home = ["HTML", "RSS", "JSON"] [taxonomies] category = "categories" tag = "tags" series = "series" ``` 3. languages.toml ```bash [en] title = "Hugo Zzo Theme" languageName = "English" weight = 1 [ko] title = "Hugo Zzo Theme" languageName = "ํ๊ตญ์ด" weight = 2 ``` 4. menus.en.toml You shoud make your own menu. ```bash [[main]] identifier = "about" name = "about" url = "about" weight = 1 [[main]] identifier = "archive" name = "archive" url = "archive" weight = 2 [[main]] identifier = "gallery" name = "gallery" url = "gallery" weight = 3 [[main]] parent = "gallery" name = "cartoon" url = "gallery/cartoon" [[main]] parent = "gallery" name = "photo" url = "gallery/photo" [[main]] identifier = "posts" name = "posts" url = "posts" weight = 4 [[main]] identifier = "notes" name = "notes" url = "notes" weight = 5 ... ``` 5. params.toml ```bash logoText = "Zzo" # Logo text that appears in the site navigation bar. description = "The Zzo theme for Hugo example site." # for SEO custom_css = [] # custom_css = ["scss/custom.scss"] and then make file at root/assets/scss/custom.scss custom_js = [] # custom_js = ["js/custom.js"] and then make file at root/assets/js/custom.js # header homeHeaderType = "text" # text, img, slide # navbar enableThemeChange = true # site color theme # body enableBreadcrumb = true # breadcrumb for list, single page enablePhotoSwipe = true # image viewer for gallery, single page enableSearch = true # site search with fuse enableGoToTop = true # scroll to top enableWhoami = true # at the end of single page summaryShape = "classic" # card, classic, compact archiveGroupByDate = "2006" # "2006-01": group by month, "2006": group by year archivePaginate = 13 # items per page paginateWindow = 1 # setting it to 1 gives 7 buttons, 2 gives 9, etc. If set 1: [1 ... 4 5 6 ... 356] [1 2 3 4 5 ... 356] etc # whoami: usage - home page sidebar, single page bottom of post. all values can be empty myname = "zzossig" email = "zzossig@gmail.com" whoami = "Web Developer" useGravatar = false location = "Seoul, Korea" organization = "Hugo" link = "https://github.com/zzossig/hugo-theme-zzo" # sidebar enableBio = true # home page sidebar enableSidebar = true # Set to false to create the full width of the content. enableSidebarTags = true # if you want to use tags. enableSidebarSeries = true enableSidebarCategories = true enableToc = true # single page table of contents, you can replace this param to toc(toc = true) hideToc = false # Hide or Show toc enableTocSwitch = true # single page table of contents visibility switch itemsPerCategory = 5 # maximum number of posts shown in the sidebar. # footer showPoweredBy = true # show footer text: Powered by Hugo and Zzo theme showFeedLinks = true # RSS Feed showSocialLinks = true # email, facebook, twitter ... enableLangChange = true # show button at bottom left of footer. themeOptions = ["dark", "light", "hacker", "solarized", "custom"] # select options for site color theme # service baiduAnalytics = "" # alternative of google analytics enableBusuanzi = false # if set true, total page view, total unique visitors show up in the footer. busuanziSiteUV = true # unique visitors (total number of visitors) busuanziSitePV = true # site total page view count busuanziPagePV = true # post view count # comment enableComment = true disqus_shortname = "" commento = false [gitment] # Gitment is a comment system based on GitHub issues. see https://github.com/imsun/gitment owner = "" # Your GitHub ID repo = "" # The repo to store comments clientId = "" # Your client ID clientSecret = "" # Your client secret [utterances] # https://utteranc.es/ owner = "" # Your GitHub ID repo = "" # The repo to store comments [gitalk] # Gitalk is a comment system based on GitHub issues. see https://github.com/gitalk/gitalk owner = "" # Your GitHub ID repo = "" # The repo to store comments clientId = "" # Your client ID clientSecret = "" # Your client secret # Valine. # You can get your appid and appkey from https://leancloud.cn # more info please open https://valine.js.org [valine] enable = false appId = 'ไฝ ็appId' appKey = 'ไฝ ็appKey' notify = false # mail notifier , https://github.com/xCss/Valine/wiki verify = false # Verification code avatar = 'mm' placeholder = '่ฏด็นไปไนๅง...' visitor = false [changyan] changyanAppid = "" # Changyan app id # ็ ่จ changyanAppkey = "" # Changyan app key [livere] livereUID = "" # LiveRe UID # ๆฅๅฟ ๅ # Isso: https://posativ.org/isso/ [isso] enable = false scriptSrc = "" # "https://isso.example.com/js/embed.min.js" dataAttrs = "" # "data-isso='https://isso.example.com' data-isso-require-author='true'" [socialOptions] # if set, social icons will show up. email = "mailto:your@email.com" facebook = "http://example.org/" twitter = "http://example.org/" github = "https://github.com/zzossig/hugo-theme-zzo" stack-overflow = "" instagram = "" google-plus = "" youtube = "" medium = "" tumblr = "" linkedin = "" pinterest = "" stack-exchange = "" telegram = "" steam = "" weibo = "" douban = "" csdn = "" zhihu = "" gitlab = "" mastodon = "" [donationOptions] enable = false # if set, the donation button will show up on the single page. alipay = "" # Alipay QR Code image (example path: images/donation/alipay-qrcode.png) and put your file at root/static/images/donation/ wechat = "" # Wechat pay QR Code image (example path: same as above) paypal = "" # Paypal URL patreon = "" # Patreon URL [copyrightOptions] enableCopyrightLink = false # if set, you can add copyright link copyrightLink = "" copyrightLinkImage = "" copyrightLinkText = "" ``` ## Layout ### CSS grid for layout ์ด ํ๋ก์ ํธ์ ๋ ์ด์์์ css์ grid๋ ๊ฑธ ์ฌ์ฉํด์ ์ก์์ต๋๋ค. ํน์๋ ์ปค์คํฐ๋ง์ด์ง ํ์ค ๋ ์์์ผ ํ ์๋ ์์ ๊ฒ ๊ฐ์์ ์๋ ค๋๋ฆฝ๋๋ค. ### grid structure | left | right | |--- |--- | | 1 | 2 | | 3 | 4 | | 5 | 6 | | 7 | 8 | * left, right column width ratio => 5 : 2 * 1 => .navbar-main * 2 => .navbar-side * 1 + 2 => .navbar * 3 => .header-main * 4 => .header-side * 3 + 4 => .header * 5 => .main-main * 6 => .main-side * 5 + 6 => .main * 7 => .footer-main * 8 => .footer-side * 7 + 8 => .footer ### grid structure example applied in home page ```html