From ee399dffeab07dca05e7fcf1fe01a5d269c49478 Mon Sep 17 00:00:00 2001 From: zzossig Date: Sun, 8 Dec 2019 02:48:37 +0900 Subject: [PATCH] korean readme.md added, i18n zh added --- .jsbeautifyrc | 27 - README.ko.md | 818 ++++++++++++++++++ README.md | 53 +- .../content/notes/hugo/syntax-highlight.md | 2 - i18n/zh.toml | 41 + theme.toml | 2 +- 6 files changed, 893 insertions(+), 50 deletions(-) delete mode 100644 .jsbeautifyrc create mode 100644 README.ko.md create mode 100644 i18n/zh.toml diff --git a/.jsbeautifyrc b/.jsbeautifyrc deleted file mode 100644 index b7356b4..0000000 --- a/.jsbeautifyrc +++ /dev/null @@ -1,27 +0,0 @@ -{ - "indent_size": 4, - "indent_char": " ", - "indent_with_tabs": false, - "editorconfig": false, - "eol": "\n", - "end_with_newline": false, - "indent_level": 0, - "preserve_newlines": true, - "max_preserve_newlines": 10, - "space_in_paren": false, - "space_in_empty_paren": false, - "jslint_happy": false, - "space_after_anon_function": false, - "space_after_named_function": false, - "brace_style": "collapse", - "unindent_chained_methods": false, - "break_chained_methods": false, - "keep_array_indentation": false, - "unescape_strings": false, - "wrap_line_length": 0, - "e4x": false, - "comma_first": false, - "operator_position": "before-newline", - "indent_empty_lines": false, - "templating": ["auto"] -} \ No newline at end of file diff --git a/README.ko.md b/README.ko.md new file mode 100644 index 0000000..b2895b3 --- /dev/null +++ b/README.ko.md @@ -0,0 +1,818 @@ +# Zzo theme for Hugo + +๐Ÿšจ๐Ÿšจ๐Ÿšจ์ตœ์†Œ๋กœ ์ง€์›๊ฐ€๋Šฅํ•œ 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) +* [๋‹ค๊ตญ์–ด](#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 + +pygmentsOptions = "linenos=table" +pygmentsUseClasses = true + +googleAnalytics = "" + +[markup] + [markup.goldmark] + [markup.goldmark.renderer] + unsafe = true + +[outputs] + home = ["HTML", "RSS", "JSON", "WEBMANIFEST"] + +[mediaTypes."application/manifest+json"] + suffixes = ["webmanifest"] + +[outputFormats.webmanifest] + name = "webmanifest" + baseName = "webmanifest" + mediaType = "application/manifest+json" + rel = "manifest" + +[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 lunr +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 +enableTocSwitch = true # single page table of contents visibility switch +itemsPerCategory = 5 # maximum number of posts shown in the sidebar. +searchLanguages = ['en'] # lunr multilanguage search. https://github.com/MihaiValentin/lunr-languages + +# 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 = "" + +[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 +``` + +## 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 + +
+
+
+
+
+