├── .node-version ├── .gitignore ├── exampleSite ├── static │ ├── css │ │ └── custom.css │ └── images │ │ └── header-image.jpg ├── .gitignore ├── content │ ├── post │ │ ├── otherSample │ │ │ └── .gitignore │ │ ├── rich-content.md │ │ ├── emoji-support.md │ │ ├── math-typesetting.md │ │ ├── placeholder-text.md │ │ └── markdown-syntax.md │ └── about.md └── config.toml ├── layouts ├── 404.html ├── _default │ ├── _markup │ │ └── render-codeblock-mermaid.html │ ├── baseof.html │ ├── list.html │ ├── terms.html │ └── single.html ├── partials │ ├── latest-posts.html │ ├── footer.html │ ├── li.html │ ├── header.html │ ├── related-tag-posts.html │ ├── related-category-posts.html │ ├── pagination.html │ └── head.html └── shortcodes │ └── lazy.html ├── config.toml ├── images ├── tn.png ├── screenshot.png ├── screenshot-red.png ├── screenshot-blue.png ├── screenshot-dark.png └── screenshot-green.png ├── static ├── images │ ├── logo.png │ ├── favicon.png │ ├── favicon-16x16.png │ ├── featured_image.jpg │ ├── apple-touch-icon.png │ └── lazy │ │ └── lazy-image.jpg ├── js │ └── single.js ├── scss │ ├── color.scss │ └── main.scss └── css │ ├── main.css │ └── color.css ├── docs └── featured_image.psd ├── archetypes └── default.md ├── theme.toml ├── package.json ├── .github └── workflows │ └── demo-page.yml ├── LICENSE └── README.md /.node-version: -------------------------------------------------------------------------------- 1 | 18.14.2 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | public 2 | node_modules -------------------------------------------------------------------------------- /exampleSite/static/css/custom.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /exampleSite/.gitignore: -------------------------------------------------------------------------------- 1 | .hugo_build.lock 2 | -------------------------------------------------------------------------------- /layouts/404.html: -------------------------------------------------------------------------------- 1 | {{define "main"}} 2 | Page Not Found. 3 | {{end}} -------------------------------------------------------------------------------- /exampleSite/content/post/otherSample/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /config.toml: -------------------------------------------------------------------------------- 1 | [module] 2 | [module.hugoVersion] 3 | min = "0.120.0" 4 | -------------------------------------------------------------------------------- /images/tn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michimani/simplog/HEAD/images/tn.png -------------------------------------------------------------------------------- /images/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michimani/simplog/HEAD/images/screenshot.png -------------------------------------------------------------------------------- /static/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michimani/simplog/HEAD/static/images/logo.png -------------------------------------------------------------------------------- /docs/featured_image.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michimani/simplog/HEAD/docs/featured_image.psd -------------------------------------------------------------------------------- /images/screenshot-red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michimani/simplog/HEAD/images/screenshot-red.png -------------------------------------------------------------------------------- /static/images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michimani/simplog/HEAD/static/images/favicon.png -------------------------------------------------------------------------------- /images/screenshot-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michimani/simplog/HEAD/images/screenshot-blue.png -------------------------------------------------------------------------------- /images/screenshot-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michimani/simplog/HEAD/images/screenshot-dark.png -------------------------------------------------------------------------------- /images/screenshot-green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michimani/simplog/HEAD/images/screenshot-green.png -------------------------------------------------------------------------------- /static/images/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michimani/simplog/HEAD/static/images/favicon-16x16.png -------------------------------------------------------------------------------- /static/images/featured_image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michimani/simplog/HEAD/static/images/featured_image.jpg -------------------------------------------------------------------------------- /static/images/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michimani/simplog/HEAD/static/images/apple-touch-icon.png -------------------------------------------------------------------------------- /static/images/lazy/lazy-image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michimani/simplog/HEAD/static/images/lazy/lazy-image.jpg -------------------------------------------------------------------------------- /exampleSite/static/images/header-image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michimani/simplog/HEAD/exampleSite/static/images/header-image.jpg -------------------------------------------------------------------------------- /layouts/_default/_markup/render-codeblock-mermaid.html: -------------------------------------------------------------------------------- 1 |
{{- .Inner | safeHTML }}
2 | {{ .Page.Store.Set "hasMermaid" true }} 3 | -------------------------------------------------------------------------------- /layouts/partials/latest-posts.html: -------------------------------------------------------------------------------- 1 | {{$related := .Site.RegularPages.Related . | first 3}} 2 | {{with $related}} 3 | 8 | {{end}} -------------------------------------------------------------------------------- /layouts/partials/footer.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /layouts/partials/li.html: -------------------------------------------------------------------------------- 1 |
  • 2 |
    {{.context.Date.Format "2006-01-02"}}
    3 |
    {{.context.Title}}
    4 | {{ if and (eq .context.Site.Params.Enabled.Summary true) (eq .isIndex true) }} 5 |
    6 | {{ .context.Summary }} 7 |
    8 | {{ end }} 9 |
  • -------------------------------------------------------------------------------- /layouts/_default/baseof.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{- partial "head.html" . -}} 5 | 6 | 7 | 8 | {{- partial "header.html" . -}} 9 |
    10 | {{- block "main" . }}{{- end }} 11 |
    12 | {{- partial "footer.html" . -}} 13 | 14 | 15 | -------------------------------------------------------------------------------- /archetypes/default.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "{{ replace .Name "-" " " | title }}" 3 | date = {{ .Date }} 4 | draft = false 5 | author = ["{{ .Site.Author }}"] 6 | categories = [""] 7 | tags = [""] 8 | archives = ["{{ dateFormat "2006" .Date }}", "{{ dateFormat "2006-01" .Date }}"] 9 | eyecatch = "images/og/{{ .Name }}.png" 10 | ogimage = "images/og/{{ .Name }}.png" 11 | comments = false 12 | description = "" 13 | url = "/{{ .Type }}/{{ .Name}}/" 14 | +++ 15 | -------------------------------------------------------------------------------- /theme.toml: -------------------------------------------------------------------------------- 1 | name = "simplog" 2 | license = "MIT" 3 | licenselink = "https://github.com/michimani/simplog/blob/master/LICENSE" 4 | description = "simplog is a simple theme for personal blog." 5 | homepage = "https://github.com/michimani/simplog" 6 | demosite = "https://michimani.github.io/simplog/" 7 | tags = ["blog", "simple", "minimal"] 8 | features = ["responsive", "show related posts by tags and categories", "archives by years", "archives by months"] 9 | 10 | [author] 11 | name = "michimani" 12 | homepage = "https://this.michimani.net" -------------------------------------------------------------------------------- /layouts/_default/list.html: -------------------------------------------------------------------------------- 1 | {{define "main"}} 2 | 3 | 4 | {{$p := .Pages}} 5 | {{if .IsHome}} 6 | {{$p = where site.RegularPages "Type" "in" site.Params.mainSections}} 7 | {{else if eq .Kind "taxonomy"}} 8 | {{$p = $p.ByTitle}} 9 | {{end}} 10 | {{$paginator := .Paginate $p}} 11 | 12 | 13 | {{ if eq .IsHome false }} 14 |

    {{.Title}}

    15 | {{ end }} 16 | 21 | 22 | 23 | {{template "partials/pagination.html" .}} 24 | 25 | {{end}} -------------------------------------------------------------------------------- /layouts/shortcodes/lazy.html: -------------------------------------------------------------------------------- 1 | {{ $abs := .Get "abs" }} 2 |
    3 |
    4 | {{ .Get "alt" }} 17 |
    18 |
    19 | -------------------------------------------------------------------------------- /layouts/partials/header.html: -------------------------------------------------------------------------------- 1 | {{ $lastBuld := now.Unix }} 2 | {{ $cahceHashBase := (sha1 $lastBuld) }} 3 | {{ $site := .Site }} 4 |
    5 | 6 | {{site.Title}} 7 | 8 | {{with site.Params.subtitle}} / {{.}}{{end}} 9 | 10 | {{ with $site.Params.headerImagePath }} 11 |
    12 | 13 |
    14 | {{ end }} 15 | 16 | 23 |
    24 | -------------------------------------------------------------------------------- /layouts/partials/related-tag-posts.html: -------------------------------------------------------------------------------- 1 | {{ $site_obj_t := .Site }} 2 | {{ range .Params.tags }} 3 | {{ $t := . }} 4 | {{ $tposts := index $site_obj_t.Taxonomies.tags (replace (lower $t) " " "-") }} 5 | {{ if gt (len $tposts) 1 }} 6 | 21 | {{ end }} 22 | {{ end }} 23 | -------------------------------------------------------------------------------- /static/js/single.js: -------------------------------------------------------------------------------- 1 | document.addEventListener("DOMContentLoaded", function() { 2 | var lazyImages = [].slice.call(document.querySelectorAll("img.lazy")); 3 | 4 | if ("IntersectionObserver" in window) { 5 | let lazyImageObserver = new IntersectionObserver(function(entries, observer) { 6 | entries.forEach(function(entry) { 7 | if (entry.isIntersecting) { 8 | let lazyImage = entry.target; 9 | lazyImage.src = lazyImage.dataset.src; 10 | lazyImage.srcset = lazyImage.dataset.srcset; 11 | lazyImage.classList.remove("lazy"); 12 | lazyImageObserver.unobserve(lazyImage); 13 | } 14 | }); 15 | }); 16 | 17 | lazyImages.forEach(function(lazyImage) { 18 | lazyImageObserver.observe(lazyImage); 19 | }); 20 | } else { 21 | // Possibly fall back to a more compatible method here 22 | } 23 | }); -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "simplog", 3 | "version": "1.0.0", 4 | "description": "Simple blog theme for Hugo", 5 | "main": "index.js", 6 | "directories": { 7 | "doc": "docs" 8 | }, 9 | "scripts": { 10 | "css:scss": "node-sass static/scss -o static/css --output-style compressed", 11 | "watch:scss": "watch 'npm run css:scss ' ./static/scss", 12 | "test": "echo 'npm run test....'" 13 | }, 14 | "repository": { 15 | "type": "git", 16 | "url": "git+https://github.com/michimani/simplog.git" 17 | }, 18 | "author": "michimani", 19 | "license": "MIT", 20 | "bugs": { 21 | "url": "https://github.com/michimani/simplog/issues" 22 | }, 23 | "homepage": "https://github.com/michimani/simplog#readme", 24 | "devDependencies": { 25 | "node-sass": "^8.0.0", 26 | "npm-check-updates": "^16.7.10", 27 | "watch": "^0.13.0" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /layouts/partials/related-category-posts.html: -------------------------------------------------------------------------------- 1 | {{ $site_obj_t := .Site }} 2 | {{ range .Params.categories }} 3 | {{ $t := . }} 4 | {{ $tposts := index $site_obj_t.Taxonomies.categories (replace (lower $t) " " "-") }} 5 | {{ if gt (len $tposts) 1 }} 6 | 21 | {{ end }} 22 | {{ end }} 23 | -------------------------------------------------------------------------------- /exampleSite/content/post/rich-content.md: -------------------------------------------------------------------------------- 1 | +++ 2 | author = "Hugo Authors" 3 | title = "Rich Content" 4 | date = "2019-03-10" 5 | description = "A brief description of Hugo Shortcodes" 6 | archives = ["2019", "2019-03"] 7 | tags = [ 8 | "shortcodes", 9 | "privacy", 10 | ] 11 | +++ 12 | 13 | Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugos-built-in-shortcodes) for rich content, along with a [Privacy Config](https://gohugo.io/about/hugo-and-gdpr/) and a set of Simple Shortcodes that enable static and no-JS versions of various social media embeds. 14 | 15 | --- 16 | 17 | ## YouTube Privacy Enhanced Shortcode 18 | 19 | {{< youtube ZJthWmvUzzc >}} 20 | 21 |
    22 | 23 | --- 24 | 25 | ## Twitter Simple Shortcode 26 | 27 | {{< twitter_simple user="DesignReviewed" id="1085870671291310081" >}} 28 | 29 |
    30 | 31 | --- 32 | 33 | ## Vimeo Simple Shortcode 34 | 35 | {{< vimeo_simple 48912912 >}} 36 | -------------------------------------------------------------------------------- /.github/workflows/demo-page.yml: -------------------------------------------------------------------------------- 1 | name: github pages 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | 8 | jobs: 9 | deploy: 10 | runs-on: ubuntu-22.04 11 | steps: 12 | - uses: actions/checkout@v2 13 | 14 | - name: Setup Hugo 15 | uses: peaceiris/actions-hugo@v2 16 | with: 17 | hugo-version: "0.150.1" 18 | 19 | - name: Pre Build 20 | run: | 21 | mv config.toml config.toml.org 22 | sed -e 's/baseURL = "https:\/\/example.com"/baseURL = "https:\/\/michimani.github.io\/simplog\/"/g' \ 23 | -e 's/disqusShortname = ""/disqusShortname = "https-michimani-github-io-simplog"/g' \ 24 | -e 's/twitter = "GoHugoIO"/twitter = "michimani210"/g' \ 25 | config.toml.org > config.toml 26 | working-directory: ./exampleSite 27 | 28 | - name: Build 29 | run: hugo --minify 30 | working-directory: ./exampleSite 31 | 32 | - name: Deploy 33 | uses: peaceiris/actions-gh-pages@v3 34 | with: 35 | github_token: ${{ secrets.GITHUB_TOKEN }} 36 | publish_dir: ./exampleSite/public 37 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2020 michimani 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /layouts/_default/terms.html: -------------------------------------------------------------------------------- 1 | {{define "main"}} 2 | 3 |

    {{ .Title }}

    4 | 25 | 26 | {{end}} -------------------------------------------------------------------------------- /exampleSite/content/about.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "About" 3 | description = "Hugo, the world's fastest framework for building websites" 4 | date = "2019-02-28" 5 | aliases = ["about-us", "about-hugo", "contact"] 6 | author = "Hugo Authors" 7 | +++ 8 | 9 | Written in Go, Hugo is an open source static site generator available under the [Apache Licence 2.0.](https://github.com/gohugoio/hugo/blob/master/LICENSE) Hugo supports TOML, YAML and JSON data file types, Markdown and HTML content files and uses shortcodes to add rich content. Other notable features are taxonomies, multilingual mode, image processing, custom output formats, HTML/CSS/JS minification and support for Sass SCSS workflows. 10 | 11 | Hugo makes use of a variety of open source projects including: 12 | 13 | * https://github.com/yuin/goldmark 14 | * https://github.com/alecthomas/chroma 15 | * https://github.com/muesli/smartcrop 16 | * https://github.com/spf13/cobra 17 | * https://github.com/spf13/viper 18 | 19 | Hugo is ideal for blogs, corporate websites, creative portfolios, online magazines, single page applications or even a website with thousands of pages. 20 | 21 | Hugo is for people who want to hand code their own website without worrying about setting up complicated runtimes, dependencies and databases. 22 | 23 | Websites built with Hugo are extremely fast, secure and can be deployed anywhere including, AWS, GitHub Pages, Heroku, Netlify and any other hosting provider. 24 | 25 | Learn more and contribute on [GitHub](https://github.com/gohugoio). 26 | -------------------------------------------------------------------------------- /static/scss/color.scss: -------------------------------------------------------------------------------- 1 | $colors:( 2 | default:( 3 | bold: #263238, 4 | main: #37474f, 5 | sub: #78909c, 6 | subsub: #cfd8dc, 7 | bg: #eceff1, 8 | ), 9 | dark:( 10 | bold: #fafafa, 11 | main: #f5f5f5, 12 | sub: #757575, 13 | subsub: #424242, 14 | bg: #212121, 15 | ), 16 | red:( 17 | bold: #b71c1c, 18 | main: #c62828, 19 | sub: #e57373, 20 | subsub: #ffcdd2, 21 | bg: #ffebee, 22 | ), 23 | green:( 24 | bold: #1b5e20, 25 | main: #2e7d32, 26 | sub: #81c784, 27 | subsub: #c8e6c9, 28 | bg: #e8f5e9, 29 | ), 30 | blue:( 31 | bold: #1a237e, 32 | main: #283593, 33 | sub: #7986cb, 34 | subsub: #c5cae9, 35 | bg: #e8eaf6, 36 | ), 37 | ); 38 | 39 | @each $title, $type in $colors { 40 | body.theme-#{$title} { 41 | 42 | background-color: map-get($type, bg); 43 | .title { 44 | color: map-get($type, bold); 45 | } 46 | .main { 47 | color: map-get($type, main); 48 | } 49 | .sub { 50 | color: map-get($type, sub); 51 | } 52 | .post-tag, .post-category { 53 | background-color: map-get($type, bold); 54 | color: map-get($type, bg); 55 | } 56 | :not(.highlight)>*>code { 57 | background-color: map-get($type, subsub); 58 | color: map-get($type, bold); 59 | } 60 | 61 | ul.pagination li.page-item { 62 | background-color: map-get($type, sub); 63 | color: map-get($type, bg); 64 | } 65 | ul.pagination li.page-item.active { 66 | background-color: map-get($type, bold); 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /exampleSite/config.toml: -------------------------------------------------------------------------------- 1 | baseURL = "https://example.com" 2 | title = "simplog" 3 | description = "" 4 | author = "michimani" 5 | copyright = "Copyright © 2021, Hugo Authors; all rights reserved." 6 | [pagination] 7 | pagerSize = 3 8 | languageCode = "en" 9 | DefaultContentLanguage = "en" 10 | enableInlineShortcodes = true 11 | ignoreErrors = ["error-remote-getjson"] 12 | googleAnalytics = "" 13 | disqusShortname = "" 14 | themesDir = "../../" # Delete this line if you want to use this theme on your site 15 | theme = "simplog" 16 | 17 | [menu] 18 | 19 | [[menu.main]] 20 | identifier = "about" 21 | name = "About" 22 | url = "/about/" 23 | weight = 10 24 | 25 | [[menu.main]] 26 | identifier = "tags" 27 | name = "Tags" 28 | url = "/tags/" 29 | weight = 20 30 | 31 | [[menu.main]] 32 | identifier = "categories" 33 | name = "Categories" 34 | url = "/categories/" 35 | weight = 30 36 | 37 | [[menu.main]] 38 | identifier = "archives" 39 | name = "Archives" 40 | url = "/archives/" 41 | weight = 40 42 | 43 | [taxonomies] 44 | category = "categories" 45 | tag = "tags" 46 | archive = "archives" 47 | 48 | [services] 49 | 50 | [services.instagram] 51 | disableInlineCSS = true 52 | 53 | [services.x] 54 | disableInlineCSS = true 55 | 56 | [params] 57 | subtitle = "simple blog theme" 58 | colorTheme = "default" 59 | description = "This is a simple blog theme for Hugo." 60 | twitter = "GoHugoIO" 61 | customCSS = "" 62 | adobeFontsKitId = "" 63 | headerImagePath = "images/header-image.jpg" 64 | 65 | [params.enabled] 66 | comment = true 67 | summary = true 68 | toc = true 69 | -------------------------------------------------------------------------------- /exampleSite/content/post/emoji-support.md: -------------------------------------------------------------------------------- 1 | +++ 2 | author = "Hugo Authors" 3 | title = "Emoji Support" 4 | date = "2019-03-05" 5 | description = "Guide to emoji usage in Hugo" 6 | archives = ["2019", "2019-03"] 7 | tags = [ 8 | "emoji", 9 | ] 10 | +++ 11 | 12 | Emoji can be enabled in a Hugo project in a number of ways. 13 | 14 | The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes). 15 | 16 | To enable emoji globally, set `enableEmoji` to `true` in your site's [configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files; e.g. 17 | 18 |

    🙈 :see_no_evil: 🙉 :hear_no_evil: 🙊 :speak_no_evil:

    19 |
    20 | 21 | The [Emoji cheat sheet](http://www.emoji-cheat-sheet.com/) is a useful reference for emoji shorthand codes. 22 | 23 | *** 24 | 25 | **N.B.** The above steps enable Unicode Standard emoji characters and sequences in Hugo, however the rendering of these glyphs depends on the browser and the platform. To style the emoji you can either use a third party emoji font or a font stack; e.g. 26 | 27 | {{< highlight html >}} 28 | .emoji { 29 | font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols; 30 | } 31 | {{< /highlight >}} 32 | 33 | {{< css.inline >}} 34 | 47 | {{< /css.inline >}} 48 | -------------------------------------------------------------------------------- /exampleSite/content/post/math-typesetting.md: -------------------------------------------------------------------------------- 1 | --- 2 | author: Hugo Authors 3 | title: Math Typesetting 4 | date: 2019-03-08 5 | description: A brief guide to setup KaTeX 6 | math: true 7 | archives: ["2019", "2019-03"] 8 | --- 9 | 10 | Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries. 11 | 12 | 13 | In this example we will be using [KaTeX](https://katex.org/) 14 | 15 | - Create a partial under `/layouts/partials/math.html` 16 | - Within this partial reference the [Auto-render Extension](https://katex.org/docs/autorender.html) or host these scripts locally. 17 | - Include the partial in your templates like so: 18 | 19 | ```bash 20 | {{ if or .Params.math .Site.Params.math }} 21 | {{ partial "math.html" . }} 22 | {{ end }} 23 | ``` 24 | 25 | - To enable KaTex globally set the parameter `math` to `true` in a project's configuration 26 | - To enable KaTex on a per page basis include the parameter `math: true` in content files 27 | 28 | **Note:** Use the online reference of [Supported TeX Functions](https://katex.org/docs/supported.html) 29 | 30 | {{< math.inline >}} 31 | {{ if or .Page.Params.math .Site.Params.math }} 32 | 33 | 34 | 35 | 36 | {{ end }} 37 | {{}} 38 | 39 | ### Examples 40 | 41 | {{< math.inline >}} 42 |

    43 | Inline math: \(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\) 44 |

    45 | {{}} 46 | 47 | Block math: 48 | $$ 49 | \varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } } 50 | $$ 51 | -------------------------------------------------------------------------------- /layouts/_default/single.html: -------------------------------------------------------------------------------- 1 | {{define "main"}} 2 | 3 | {{ if templates.Exists "partials/top-of-content.html" }} 4 | {{ partial "top-of-content.html" . }} 5 | {{ end }} 6 | 7 | 8 |

    {{.Title}}

    9 | {{ if or (not .Params.hideDate) (eq .Params.hideDate false) }} 10 | {{.Date.Format "2006-01-02"}} 11 | {{ end }} 12 | 13 | 14 | 15 | 16 | {{ if eq .Site.Params.Enabled.Toc true }} 17 | {{.TableOfContents}} 18 | {{ end }} 19 | 20 | 21 | {{.Content}} 22 | 23 | {{ if templates.Exists "partials/bottom-of-content.html" }} 24 | {{ partial "bottom-of-content.html" . }} 25 | {{ end }} 26 | 27 | {{ if ne .Title "About" }} 28 | 29 |
    30 | 31 | 32 | {{ $tags := .GetTerms "tags" }} 33 | {{ if gt (len $tags) 0 }} 34 | 40 | {{ end }} 41 | 42 | 43 | {{ if and (eq .Params.comments true) (eq .Site.Params.Enabled.Comment true) }} 44 | {{ template "_internal/disqus.html" . }} 45 | {{ end }} 46 | 47 | {{ if or (not .Params.hideNeighbor) (eq .Params.hideNeighbor false) }} 48 | 49 | 57 | {{ end }} 58 | 59 | 60 | 61 | {{ partial "related-category-posts.html" . }} 62 | 63 | 64 | {{ partial "related-tag-posts.html" . }} 65 | {{ end }} 66 | 67 | 68 | 69 | 70 | {{ if .Page.Store.Get "hasMermaid" }} 71 | 72 | 75 | {{ end }} 76 | 77 | {{end}} -------------------------------------------------------------------------------- /layouts/partials/pagination.html: -------------------------------------------------------------------------------- 1 | {{ $pag := $.Paginator }} 2 | {{ if gt $pag.TotalPages 1 }} 3 | 50 | {{ end }} 51 | -------------------------------------------------------------------------------- /static/css/main.css: -------------------------------------------------------------------------------- 1 | *{color:inherit}body{margin:0 auto}a{text-decoration:none;opacity:80%;line-height:1.5em}a:hover{opacity:70%}html{-webkit-text-size-adjust:100%}blockquote{font-style:italic}#content-header{padding:10px 0px}#content-header .site-title{font-size:2em;font-weight:900;display:inline-block}#content-header .site-sub-title{font-size:1.2em;font-weight:600;display:inline-block}#main-menu-nav-items{margin:20px 0px 10px 0px;display:grid;grid-template-columns:25% 25% 25% 25%}#main-menu-nav-items .nav-item{text-align:center}#header-image-area{margin:5px 0px -10px 0px}#header-image-area img.header-image{width:100%;height:auto}.post-list{marker:none;padding-inline-start:0px}.post-list li.post-item{display:block;margin:10px 0px 20px 0px}.post-list li.post-item .post-date{font-size:0.9em}.post-list li.post-item .post-title{font-weight:600}.post-list li.post-item .post-summary{font-size:0.8em}.post-list li.post-item .post-summary p{margin:0px}#content h1,#content h2,#content h3,#content h4,#content h5,#content h6{line-height:1.2em}#content h1{margin:30px 0px 10px 0px}#content h2,#content h3,#content h4,#content h5,#content h6{margin:20px 0px 10px 0px}pre{padding:10px}.post-tag,.post-category,:not(.highlight)>*>code{border-radius:4px;padding:2px 5px}div.highlight>pre{overflow-x:scroll}.content-footer-item{margin:5px}.neighbor{display:grid;grid-template-columns:1fr 1fr;margin:20px 5px}.related-tag-category-list{margin:10px}.related-tag-category-list .more-area{text-align:right}ul.pagination{text-align:center;margin:30px 0px;padding-inline-start:0px}ul.pagination li.page-item{display:inline;padding:6px;margin:4px;border-radius:10%;font-size:0.9em}ul.pagination li.page-item.disabled{opacity:40%}#content-footer{text-align:center;font-size:0.8em;margin:20px 0px 10px 0px}#term-item-list li{font-size:1.1em;margin:4px}#term-item-list>.archives-item.mo{margin-left:2rem}.block-separater{margin:20px 0px 0px 0px}@media only screen and (min-width: 768px){body{max-width:800px;width:90%}img{width:100%}}@media only screen and (max-width: 768px){body{max-width:90%;font-size:14px}img{max-width:100%}.neighbor{grid-template-columns:1fr}.neighbor>div{margin:5px 0px}}@media only screen and (max-width: 414px){body{max-width:90%;font-size:14px}img{max-width:100%}.neighbor{grid-template-columns:1fr}.neighbor>div{margin:5px 0px}} 2 | -------------------------------------------------------------------------------- /static/css/color.css: -------------------------------------------------------------------------------- 1 | body.theme-default{background-color:#eceff1}body.theme-default .title{color:#263238}body.theme-default .main{color:#37474f}body.theme-default .sub{color:#78909c}body.theme-default .post-tag,body.theme-default .post-category{background-color:#263238;color:#eceff1}body.theme-default :not(.highlight)>*>code{background-color:#cfd8dc;color:#263238}body.theme-default ul.pagination li.page-item{background-color:#78909c;color:#eceff1}body.theme-default ul.pagination li.page-item.active{background-color:#263238}body.theme-dark{background-color:#212121}body.theme-dark .title{color:#fafafa}body.theme-dark .main{color:#f5f5f5}body.theme-dark .sub{color:#757575}body.theme-dark .post-tag,body.theme-dark .post-category{background-color:#fafafa;color:#212121}body.theme-dark :not(.highlight)>*>code{background-color:#424242;color:#fafafa}body.theme-dark ul.pagination li.page-item{background-color:#757575;color:#212121}body.theme-dark ul.pagination li.page-item.active{background-color:#fafafa}body.theme-red{background-color:#ffebee}body.theme-red .title{color:#b71c1c}body.theme-red .main{color:#c62828}body.theme-red .sub{color:#e57373}body.theme-red .post-tag,body.theme-red .post-category{background-color:#b71c1c;color:#ffebee}body.theme-red :not(.highlight)>*>code{background-color:#ffcdd2;color:#b71c1c}body.theme-red ul.pagination li.page-item{background-color:#e57373;color:#ffebee}body.theme-red ul.pagination li.page-item.active{background-color:#b71c1c}body.theme-green{background-color:#e8f5e9}body.theme-green .title{color:#1b5e20}body.theme-green .main{color:#2e7d32}body.theme-green .sub{color:#81c784}body.theme-green .post-tag,body.theme-green .post-category{background-color:#1b5e20;color:#e8f5e9}body.theme-green :not(.highlight)>*>code{background-color:#c8e6c9;color:#1b5e20}body.theme-green ul.pagination li.page-item{background-color:#81c784;color:#e8f5e9}body.theme-green ul.pagination li.page-item.active{background-color:#1b5e20}body.theme-blue{background-color:#e8eaf6}body.theme-blue .title{color:#1a237e}body.theme-blue .main{color:#283593}body.theme-blue .sub{color:#7986cb}body.theme-blue .post-tag,body.theme-blue .post-category{background-color:#1a237e;color:#e8eaf6}body.theme-blue :not(.highlight)>*>code{background-color:#c5cae9;color:#1a237e}body.theme-blue ul.pagination li.page-item{background-color:#7986cb;color:#e8eaf6}body.theme-blue ul.pagination li.page-item.active{background-color:#1a237e} 2 | -------------------------------------------------------------------------------- /exampleSite/content/post/placeholder-text.md: -------------------------------------------------------------------------------- 1 | +++ 2 | author = "Hugo Authors" 3 | title = "Placeholder Text" 4 | date = "2019-03-09" 5 | description = "Lorem Ipsum Dolor Si Amet" 6 | archives = ["2019", "2019-03"] 7 | tags = [ 8 | "markdown", 9 | "text", 10 | ] 11 | +++ 12 | 13 | Lorem est tota propiore conpellat pectoribus de pectora summo. Redit teque digerit hominumque toris verebor lumina non cervice subde tollit usus habet Arctonque, furores quas nec ferunt. Quoque montibus nunc caluere tempus inhospita parcite confusaque translucet patri vestro qui optatis lumine cognoscere flos nubis! Fronde ipsamque patulos Dryopen deorum. 14 | 15 | 1. Exierant elisi ambit vivere dedere 16 | 2. Duce pollice 17 | 3. Eris modo 18 | 4. Spargitque ferrea quos palude 19 | 20 | Rursus nulli murmur; hastile inridet ut ab gravi sententia! Nomine potitus silentia flumen, sustinet placuit petis in dilapsa erat sunt. Atria tractus malis. 21 | 22 | 1. Comas hunc haec pietate fetum procerum dixit 23 | 2. Post torum vates letum Tiresia 24 | 3. Flumen querellas 25 | 4. Arcanaque montibus omnes 26 | 5. Quidem et 27 | 28 | # Vagus elidunt 29 | 30 | 31 | 32 | [The Van de Graaf Canon](https://en.wikipedia.org/wiki/Canons_of_page_construction#Van_de_Graaf_canon) 33 | 34 | ## Mane refeci capiebant unda mulcebat 35 | 36 | Victa caducifer, malo vulnere contra dicere aurato, ludit regale, voca! Retorsit colit est profanae esse virescere furit nec; iaculi matertera et visa est, viribus. Divesque creatis, tecta novat collumque vulnus est, parvas. **Faces illo pepulere** tempus adest. Tendit flamma, ab opes virum sustinet, sidus sequendo urbis. 37 | 38 | Iubar proles corpore raptos vero auctor imperium; sed et huic: manus caeli Lelegas tu lux. Verbis obstitit intus oblectamina fixis linguisque ausus sperare Echionides cornuaque tenent clausit possit. Omnia putatur. Praeteritae refert ausus; ferebant e primus lora nutat, vici quae mea ipse. Et iter nil spectatae vulnus haerentia iuste et exercebat, sui et. 39 | 40 | Eurytus Hector, materna ipsumque ut Politen, nec, nate, ignari, vernum cohaesit sequitur. Vel **mitis temploque** vocatus, inque alis, *oculos nomen* non silvis corpore coniunx ne displicet illa. Crescunt non unus, vidit visa quantum inmiti flumina mortis facto sic: undique a alios vincula sunt iactata abdita! Suspenderat ego fuit tendit: luna, ante urbem Propoetides **parte**. 41 | 42 | {{< css.inline >}} 43 | 46 | {{< /css.inline >}} 47 | -------------------------------------------------------------------------------- /layouts/partials/head.html: -------------------------------------------------------------------------------- 1 | {{ $lastBuld := now.Unix }} 2 | {{ $cacheHashBase := (sha1 $lastBuld) }} 3 | {{ $site := .Site }} 4 | {{ if not hugo.IsServer }} 5 | {{ template "_internal/google_analytics.html" . }} 6 | {{ end }} 7 | 8 | 9 | {{ if .IsHome }} 10 | {{ $site.Title }} 11 | 12 | {{ else }} 13 | {{ .Title }} - {{ $site.Title }} 14 | 15 | {{ end }} 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | {{ with .Params.ogimage }} 29 | 30 | {{ else }} 31 | 32 | {{ end }} 33 | 34 | 35 | 36 | 37 | 38 | 39 | {{ with .Params.ogimage }} 40 | 41 | {{ else }} 42 | 43 | {{ end }} 44 | 45 | 46 | 47 | 48 | {{ with $site.Params.CustomCSS }} 49 | 50 | {{ end }} 51 | 52 | {{ with $site.Params.AdobeFontsKitId }} 53 | 54 | 64 | 65 | {{ if templates.Exists "partials/additional-custom-head.html" }} 66 | {{ partial "additional-custom-head.html" $site }} 67 | {{ end }} 68 | 69 | {{ end }} 70 | -------------------------------------------------------------------------------- /static/scss/main.scss: -------------------------------------------------------------------------------- 1 | /* common */ 2 | * { 3 | color: inherit; 4 | } 5 | body { 6 | margin: 0 auto; 7 | } 8 | a { 9 | text-decoration: none; 10 | opacity: 80%; 11 | line-height: 1.5em; 12 | &:hover { 13 | opacity: 70%; 14 | } 15 | } 16 | 17 | html { 18 | -webkit-text-size-adjust: 100%; 19 | } 20 | 21 | blockquote { 22 | font-style: italic; 23 | } 24 | 25 | /* header */ 26 | #content-header { 27 | padding: 10px 0px; 28 | .site-title { 29 | font-size: 2em; 30 | font-weight: 900; 31 | display: inline-block; 32 | } 33 | .site-sub-title { 34 | font-size: 1.2em; 35 | font-weight: 600; 36 | display: inline-block; 37 | } 38 | } 39 | 40 | #main-menu-nav-items { 41 | margin: 20px 0px 10px 0px; 42 | display: grid; 43 | grid-template-columns: 25% 25% 25% 25%; 44 | .nav-item { 45 | text-align: center; 46 | } 47 | } 48 | 49 | #header-image-area { 50 | margin: 5px 0px -10px 0px; 51 | img.header-image { 52 | width: 100%; 53 | height: auto; 54 | } 55 | } 56 | 57 | /* post list */ 58 | .post-list { 59 | marker: none; 60 | padding-inline-start: 0px; 61 | li.post-item { 62 | display: block; 63 | margin: 10px 0px 20px 0px; 64 | .post-date { 65 | font-size: 0.9em; 66 | } 67 | .post-title { 68 | font-weight: 600; 69 | } 70 | .post-summary { 71 | font-size: 0.8em; 72 | } 73 | .post-summary p { 74 | margin: 0px; 75 | } 76 | } 77 | } 78 | 79 | /* content */ 80 | /* head */ 81 | #content { 82 | h1, h2, h3, h4, h5, h6 { 83 | line-height: 1.2em; 84 | } 85 | 86 | h1 { 87 | margin: 30px 0px 10px 0px; 88 | } 89 | 90 | h2, h3, h4, h5, h6 { 91 | margin: 20px 0px 10px 0px; 92 | } 93 | } 94 | 95 | /* code, tag, category */ 96 | pre { 97 | padding: 10px; 98 | } 99 | .post-tag, .post-category, :not(.highlight)>*>code { 100 | border-radius: 4px; 101 | padding: 2px 5px; 102 | } 103 | div.highlight > pre { 104 | overflow-x: scroll; 105 | } 106 | 107 | /* content footer */ 108 | .content-footer-item { 109 | margin: 5px; 110 | } 111 | .neighbor { 112 | display: grid; 113 | grid-template-columns: 1fr 1fr; 114 | margin: 20px 5px; 115 | } 116 | 117 | /* see also */ 118 | .related-tag-category-list { 119 | margin: 10px; 120 | .more-area { 121 | text-align: right; 122 | } 123 | } 124 | 125 | /* pagination */ 126 | ul.pagination { 127 | text-align: center; 128 | margin: 30px 0px; 129 | padding-inline-start: 0px; 130 | li.page-item { 131 | display: inline; 132 | padding: 6px; 133 | margin: 4px; 134 | border-radius: 10%; 135 | font-size: 0.9em; 136 | &.disabled { 137 | opacity: 40%; 138 | } 139 | } 140 | } 141 | 142 | /* footer */ 143 | #content-footer { 144 | text-align: center; 145 | font-size: 0.8em; 146 | margin: 20px 0px 10px 0px; 147 | } 148 | 149 | /* terms */ 150 | /* archives */ 151 | #term-item-list li { 152 | font-size: 1.1em; 153 | margin: 4px; 154 | } 155 | #term-item-list > .archives-item.mo { 156 | margin-left: 2rem; 157 | } 158 | 159 | .block-separater { 160 | margin: 20px 0px 0px 0px; 161 | } 162 | 163 | /* responsive */ 164 | /* Desktop styles */ 165 | @media only screen and (min-width: 860px) { 166 | } 167 | 168 | @media only screen and (min-width: 768px) { 169 | body { 170 | max-width: 800px; 171 | width: 90%; 172 | } 173 | img { 174 | width: 100%; 175 | } 176 | } 177 | 178 | /* High-DPI mobile styles */ 179 | @media only screen and (max-width: 768px) { 180 | body { 181 | max-width: 90%; 182 | font-size: 14px; 183 | } 184 | img { 185 | max-width: 100%; 186 | } 187 | .neighbor { 188 | grid-template-columns: 1fr; 189 | } 190 | .neighbor > div { 191 | margin: 5px 0px; 192 | } 193 | } 194 | 195 | /* Low-DPI mobile styles */ 196 | @media only screen and (max-width: 414px) { 197 | body { 198 | max-width: 90%; 199 | font-size: 14px; 200 | } 201 | img { 202 | max-width: 100%; 203 | } 204 | .neighbor { 205 | grid-template-columns: 1fr; 206 | } 207 | .neighbor > div { 208 | margin: 5px 0px; 209 | } 210 | } -------------------------------------------------------------------------------- /exampleSite/content/post/markdown-syntax.md: -------------------------------------------------------------------------------- 1 | +++ 2 | author = "Hugo Authors" 3 | title = "Markdown Syntax Guide" 4 | date = "2019-03-11" 5 | description = "Sample article showcasing basic Markdown syntax and formatting for HTML elements." 6 | archives = ["2019", "2019-03"] 7 | tags = [ 8 | "markdown", 9 | "css", 10 | "html", 11 | ] 12 | categories = [ 13 | "themes", 14 | "syntax", 15 | ] 16 | series = ["Themes Guide"] 17 | aliases = ["migrate-from-jekyl"] 18 | comments = true 19 | +++ 20 | 21 | This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme. 22 | 23 | 24 | ## Headings 25 | 26 | The following HTML `

    `—`

    ` elements represent six levels of section headings. `

    ` is the highest section level while `

    ` is the lowest. 27 | 28 | # H1 29 | ## H2 30 | ### H3 31 | #### H4 32 | ##### H5 33 | ###### H6 34 | 35 | ## Paragraph 36 | 37 | Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat. 38 | 39 | Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat. 40 | 41 | ## Blockquotes 42 | 43 | The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a `footer` or `cite` element, and optionally with in-line changes such as annotations and abbreviations. 44 | 45 | #### Blockquote without attribution 46 | 47 | > Tiam, ad mint andaepu dandae nostion secatur sequo quae. 48 | > **Note** that you can use *Markdown syntax* within a blockquote. 49 | 50 | #### Blockquote with attribution 51 | 52 | > Don't communicate by sharing memory, share memory by communicating.
    53 | > — Rob Pike[^1] 54 | 55 | [^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015. 56 | 57 | ## Tables 58 | 59 | Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box. 60 | 61 | Name | Age 62 | --------|------ 63 | Bob | 27 64 | Alice | 23 65 | 66 | #### Inline Markdown within tables 67 | 68 | | Italics | Bold | Code | 69 | | -------- | -------- | ------ | 70 | | *italics* | **bold** | `code` | 71 | 72 | ## Code Blocks 73 | 74 | #### Code block with backticks 75 | 76 | ```html 77 | 78 | 79 | 80 | 81 | Example HTML5 Document 82 | 83 | 84 |

    Test

    85 | 86 | 87 | ``` 88 | 89 | #### Code block indented with four spaces 90 | 91 | 92 | 93 | 94 | 95 | Example HTML5 Document 96 | 97 | 98 |

    Test

    99 | 100 | 101 | 102 | #### Code block with Hugo's internal highlight shortcode 103 | {{< highlight html >}} 104 | 105 | 106 | 107 | 108 | Example HTML5 Document 109 | 110 | 111 |

    Test

    112 | 113 | 114 | {{< /highlight >}} 115 | 116 | ## List Types 117 | 118 | #### Ordered List 119 | 120 | 1. First item 121 | 2. Second item 122 | 3. Third item 123 | 124 | #### Unordered List 125 | 126 | * List item 127 | * Another item 128 | * And another item 129 | 130 | #### Nested list 131 | 132 | * Fruit 133 | * Apple 134 | * Orange 135 | * Banana 136 | * Dairy 137 | * Milk 138 | * Cheese 139 | 140 | ## Mermaid 141 | 142 | ```mermaid 143 | sequenceDiagram 144 | participant Alice 145 | participant Bob 146 | Alice->>John: Hello John, how are you? 147 | loop Healthcheck 148 | John->John: Fight against hypochondria 149 | end 150 | Note right of John: Rational thoughts
    prevail... 151 | John-->Alice: Great! 152 | John->Bob: How about you? 153 | Bob-->John: Jolly good! 154 | ``` 155 | 156 | 157 | ## Other Elements — abbr, sub, sup, kbd, mark 158 | 159 | GIF is a bitmap image format. 160 | 161 | H2O 162 | 163 | Xn + Yn = Zn 164 | 165 | Press CTRL+ALT+Delete to end the session. 166 | 167 | Most salamanders are nocturnal, and hunt for insects, worms, and other small creatures. 168 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | simplog 2 | --- 3 | 4 | [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fmichimani%2Fsimplog.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fmichimani%2Fsimplog?ref=badge_shield) 5 | 6 | 7 | simplog is a simple blog theme for [Hugo](https://gohugo.io/). 8 | 9 | ![screenshot-default](https://user-images.githubusercontent.com/9986092/103643356-de1c8880-4f97-11eb-93d3-05889b839f9f.png) 10 | 11 | Demo site is [here](https://michimani.github.io/simplog/). 12 | 13 | ## Features 14 | 15 | - Google Analytics 16 | - Disqus 17 | - Some theme colors 18 | - Responsive 19 | - Custom CSS 20 | - Adobe Fonts 21 | - Lazy load image 22 | - Support tags, categories and archives page 23 | - Show related tags and categories posts 24 | 25 | ## Installation 26 | 27 | ```bash 28 | git submodule add https://github.com/michimani/simplog.git ./themes/simplog 29 | ``` 30 | 31 | ## Updating 32 | 33 | ```bash 34 | git submodule update --remote --merge 35 | ``` 36 | 37 | ## Detail of features 38 | 39 | ### Google Analytics 40 | 41 | You can insert the Google Analytics tracking code into top of `head` tag. If you insert the tag, set tracking ID at `config.toml`. 42 | 43 | ```toml 44 | googleAnalytics = "" 45 | ``` 46 | 47 | ### Disqus 48 | 49 | You can set the comment form via Disqus. If you set the comment form, set disqus short name at `config.toml`. 50 | 51 | ```toml 52 | disqusShortname = "" 53 | ``` 54 | 55 | And if you enable comment form, set `true` at `config.toml` and each post file. 56 | 57 | - `config.toml` 58 | 59 | ```toml 60 | [params] 61 | [params.enabled] 62 | comment = true 63 | ``` 64 | 65 | - each post file 66 | 67 | ```toml 68 | +++ 69 | # some 70 | # settings 71 | # of 72 | # post 73 | comments = true 74 | +++ 75 | ``` 76 | 77 | The comment form will be enabled when both of them are `true`. 78 | 79 | ### Custom CSS 80 | 81 | If you want to use your own CSS, set value that is path to your CSS file at `config.toml` 82 | 83 | ```toml 84 | [params] 85 | customCSS = "" 86 | ``` 87 | 88 | ### Adobe Fonts 89 | 90 | If you use Adobe Fonts in your site, set value that is Adobe Fonts Kit ID at `config.toml`. In this case you will need to set custom css as well. 91 | 92 | ```toml 93 | [params] 94 | adobeFontsKitId = "" 95 | ``` 96 | 97 | ### Some theme colors 98 | 99 | You can change theme color easily. Set the value one of `default`, `dark`, `red`, `green` and `blue` at `config.toml`. 100 | 101 | ```toml 102 | [params] 103 | colorTheme = "default" 104 | ``` 105 | 106 | - Dark 107 | 108 | ![screenshot-dark](https://user-images.githubusercontent.com/9986092/103643351-dceb5b80-4f97-11eb-836a-24f22ec969b1.png) 109 | 110 | - Red/Green/Blue 111 | 112 | ![screenshot-red](https://user-images.githubusercontent.com/9986092/103643355-de1c8880-4f97-11eb-9248-e7be5be63ed3.png) 113 | ![screenshot-green](https://user-images.githubusercontent.com/9986092/103643352-dd83f200-4f97-11eb-8a10-7ad39bb8a6ca.png) 114 | ![screenshot-blue](https://user-images.githubusercontent.com/9986092/103643347-d9f06b00-4f97-11eb-8bd6-0f57462b2e3d.png) 115 | 116 | ### Lazy load image 117 | 118 | You can easily set up an image tag for lazy loading by using the shortcode below. 119 | 120 | ```markdown 121 | {{< lazy src="image-file-name.jpg" alt="attribute for this image" >}} 122 | ``` 123 | 124 | In the above case, the image files under the `images` directory will be displayed. (e.g. `/images/image-file-name.jpg`) 125 | 126 | If you want to specify another path or a path with a different domain, write the full path to the image file and add `abs =" y "`. 127 | 128 | ```markdown 129 | {{< lazy src="https://michimani.github.io/simplog/images/featured_image.jpg" alt="attribute for this image" abs="y" >}} 130 | ``` 131 | 132 | ### Mermaid 133 | 134 | You can use the mermaid language in Markdown code blocks. 135 | 136 | 137 | ```markdown 138 | ```mermaid 139 | sequenceDiagram 140 | participant Alice 141 | participant Bob 142 | Alice->>John: Hello John, how are you? 143 | loop Healthcheck 144 | John->John: Fight against hypochondria 145 | end 146 | Note right of John: Rational thoughts
    prevail... 147 | John-->Alice: Great! 148 | John->Bob: How about you? 149 | Bob-->John: Jolly good! 150 | `` 151 | ``` 152 | 153 | ## Developmet 154 | 155 | Install `nodenv` and install `node 18.x` 156 | 157 | ```bash 158 | brew install nodenv 159 | ``` 160 | 161 | ```bash 162 | nodenv install 18.14.2 163 | ``` 164 | 165 | Install the node module for development such as CSS generation. 166 | 167 | ```bash 168 | npm install 169 | ``` 170 | 171 | ### Generate CSS from SCSS 172 | 173 | To generate CSS from SCSS, run the following command. 174 | 175 | ```bash 176 | npm run css:scss 177 | ``` 178 | 179 | If you want to monitor SCSS changes, run the following command. 180 | 181 | ```bash 182 | npm run watch:scss 183 | ``` 184 | 185 | 186 | ## License 187 | [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fmichimani%2Fsimplog.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fmichimani%2Fsimplog?ref=badge_large) 188 | --------------------------------------------------------------------------------