# Zzo theme for Hugo Thank you for click me!. Zzo theme is a blog theme powered by Hugo with free(always), and many features. ## Table of contents * [Features](#features) * [Reference](#reference) * [Minimum Hugo version](#minimum-hugo-version) * [Installation](#installation) * [Updating](#updating) * [Run example site](#run-example-site) * [Configuration](#configuration) * [Layout](#layout) * [Gallery](#gallery) * [Multi Language](#multi-language) * [Customizing](#customizing) * [Marmaid, Katex, MathJax, Flowchart.js](#external-library) * [Shortcodes](#shortcodes) ## Features * Multiple Skins(dark, light, solarized, hacker) * A mobile menu * CSS grid and flex for layout * HTML5 * Hugo Pipes for js and sass * jQuery * Simple blog * Minify css * Meta tags and JSON-LD * Multilingual (i18n) * Responsive design * RSS and JSON feeds with full content * Search with Lunr * Gallery with Masonry, Photoswipe * Prism.js for highlight code ## Minimum Hugo version Hugo version 0.58.0 or higher is required. ## Installation First of all, You need to add config files. Follow the [Configuration](#configuration) step. Then, You can download and unpack the theme manually from Github but it's easier to use git to clone the repo. From the root of your site: ```bash $ git clone https://github.com/zzossig/hugo-theme-zzo.git themes/zzo ``` If you use git to version control your site, highly recommended, it's best to add the zzo theme as a submodule. From the root of your site: ```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. From the root of your site: delete config.toml file and add the files below 1. config folder structure ```bash root ├── config │ ├── _default │ │ ├── config.toml │ │ ├── languages.toml │ │ ├── menus.en.toml │ │ ├── params.toml ``` 2. config.toml ```bash baseURL = "http://example.org/" title = "Hugo Zzo Theme" theme = "zzo" defaultContentLanguage = "en" defaultContentLanguageInSubdir = true hasCJKLanguage = true summaryLength = 70 copyright = "©{year}, All Rights Reserved" timeout = 10000 enableEmoji = true paginate = 13 rssLimit = 100 pygmentsOptions = "linenos=table" pygmentsCodefences = true pygmentsUseClasses = true pygmentsCodefencesGuessSyntax = true [outputs] home = ["HTML", "RSS", "JSON", "WebAppManifest"] [mediaTypes."application/manifest+json"] suffixes = ["webmanifest"] [outputFormats.WebAppManifest] 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" description = "The Zzo theme for Hugo example site." custom_css = [] custom_js = [] # header homeHeaderType = "slide" # text, img, slide # body enableBreadcrumb = true enablePhotoSwipe = true enableSearch = true enableGoToTop = true enableWhoami = true summaryShape = "classic" # card, classic, compact archiveGroupByDate = "2006" # "2006-01": group by month, "2006": group by year archivePaginate = 13 paginateWindow = 1 # whoami 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 enableSidebar = true enableSidebarTags = true enableSidebarSeries = true enableSidebarCategories = true enableToc = true enableTocSwitch = true itemsPerCategory = 5 searchLanguages = ['en'] # footer showPoweredBy = true showFeedLinks = true showSocialLinks = true enableLangChange = true enableThemeChange = true themeOptions = ["dark", "light", "hacker", "solarized", "custom"] # 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'" [marketing] google_analytics = "" google_tag_manager = "" [socialOptions] 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 = "" ``` ## Layout ### CSS grid for layout Modern CSS grid is the easiest and cleanest way to layout your pages. The CSS grid layout are in `assets/sass/layout/_grid.scss`. A lot can be done by just reordering "grid-template-rows". ### 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