diff options
author | d-asnaghi <asnaghi@me.com> | 2020-05-17 21:26:19 +0300 |
---|---|---|
committer | d-asnaghi <asnaghi@me.com> | 2020-05-17 21:26:19 +0300 |
commit | 9116e9a3d4ffd4865b89f000bee2badb7b3663f3 (patch) | |
tree | 2715d693ba9e845d0045acefc5da4c500913f94c | |
parent | da80a9e0b3ce7548f90587ada99d628c6217a58b (diff) |
[HUGO] base example format
-rw-r--r-- | layouts/_default/list.html | 16 | ||||
-rw-r--r-- | layouts/partials/header.html | 2 | ||||
-rw-r--r-- | theme.toml | 2 |
3 files changed, 11 insertions, 9 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 77d4fba..d4ba228 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -12,7 +12,7 @@ </div> <div class="content"> <div class="inner"> - <h1>{{ .Title }}</h1> + <h1>{{ .Title | default "Title" }}</h1> {{ if .Params.description }} <p> {{ .Params.description }} @@ -37,12 +37,14 @@ <div id="main"> {{ range .Pages }} - {{if .Content}} - <article id="{{ .Title | urlize }}"> - <h2 class="major">{{ .Title }}</h2> - <span class="image main"><img src="{{ .Params.image }}" alt="" /></span> - {{ .Content }} - </article> + {{if .Content }} + {{if .Title }} + <article id="{{ .Title | urlize }}"> + <h2 class="major">{{ .Title }}</h2> + <span class="image main"><img src="{{ .Params.image }}" alt="" /></span> + {{ .Content }} + </article> + {{ end }} {{ end }} {{ end }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 6e9c92c..e0be750 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,7 +1,7 @@ <!DOCTYPE html> <html> <head> - <title>{{ .Params.Title }}</title> + <title>{{ .Params.Title | default "Title" }}</title> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" /> <link rel="stylesheet" href={{ "assets/css/main.css" | absURL }}/> @@ -5,7 +5,7 @@ description = "A port of HTML5's dimension theme, optimized for markdown based C homepage = "https://github.com/your-identity/hugo-theme-dimension/" tags = ["blog", "clean", "customizable", "dark", "highlighting", "minimal", "personal", "responsive", "simple", "responsive"] features = ["blog", "syntax highlighting"] -min_version = 0.59.0 +min_version = 0.57 [author] name = "d-asnaghi" |