Define the Base Template and fix Hugo warnings
* Define the Base Template (baseof.html) * Use relative URL link to style.css file * Move summary.html from partials to _default layouts * Fix Hugo warnings (needs Hugo 0.20 or newer) * Fix Paginator rule on main page. Fix #8 * Latest posts: show pages from mainSections only * Bump Hugo 0.19 -> 0.20 * Formatting
This commit is contained in:
parent
c71d33abd2
commit
c8bf719e3d
10 changed files with 77 additions and 67 deletions
|
@ -1,5 +1,3 @@
|
|||
<footer>
|
||||
<p>© {{ now.Year }} <a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
<footer>
|
||||
<p>© {{ now.Year }} <a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></p>
|
||||
</footer>
|
||||
|
|
|
@ -1,24 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.LanguageCode | default "en-us" }}">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>{{ .Title }}</title>
|
||||
{{ with .Site.Params.description }}<meta name="description" content="{{ . }}">{{ end }}
|
||||
{{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
|
||||
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/style.css">
|
||||
{{ if .RSSLink -}}<link href="{{ .RSSLink }}" rel="feed" type="application/rss+xml" title="{{ .Site.Title }}">{{- end }}
|
||||
{{ .Hugo.Generator }}
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
|
||||
<nav>
|
||||
<ul>
|
||||
{{ range .Site.Menus.main }}
|
||||
<li><a href="{{ .URL | relURL }}">{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
<header>
|
||||
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
|
||||
<nav>
|
||||
<ul>
|
||||
{{ range .Site.Menus.main }}
|
||||
<li><a href="{{ .URL | relURL }}">{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<aside>
|
||||
<aside>
|
||||
<div>
|
||||
<div>
|
||||
<div>
|
||||
<h3>LATEST POSTS</h3>
|
||||
</div>
|
||||
<div>
|
||||
<ul>
|
||||
{{ range first 5 .Site.Pages }}
|
||||
<li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
<h3>LATEST POSTS</h3>
|
||||
</div>
|
||||
</aside>
|
||||
<div>
|
||||
<ul>
|
||||
{{ range first 5 (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }}
|
||||
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
<article>
|
||||
<h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
|
||||
<time>{{ .Date.Format "02.01.2006 15:04" }}</time>
|
||||
{{ range .Params.tags }}
|
||||
<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>
|
||||
{{ end }}
|
||||
<div>
|
||||
{{ .Summary }}
|
||||
{{ if .Truncated }}
|
||||
<a href="{{ .Permalink }}">Read more...</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</article>
|
Loading…
Add table
Add a link
Reference in a new issue