Browse Source

examples: Fix blog not building

The example blog had not been updated for some time and I had to restructure it a little bit.

Fixes #6752

Changed tag and category directory structure
pull/6781/head
Jonathan Ling 6 years ago
committed by Bjørn Erik Pedersen
parent
commit
d61bee5e09
  1. 25
      examples/blog/layouts/categories/list.html
  2. 24
      examples/blog/layouts/indexes/category.html
  3. 5
      examples/blog/layouts/partials/header.html
  4. 0
      examples/blog/layouts/post/list.html
  5. 0
      examples/blog/layouts/tags/list.html

25
examples/blog/layouts/categories/list.html

@ -0,0 +1,25 @@
{{ partial "header.html" . }}
<body>
{{ partial "navbar.html" . }}
<div class="container">
<div class="row">
<div class="col-md-9">
<div class="well well-sm">
<strong>Items in category <code>{{ .Title | lower }}</code></strong>
<ul class="list-unstyled">
{{ range .Data.Pages }}
{{ .Render "li" }}
{{ end}}
</ul>
</div>
</div>
<!-- Sidebar -->
<div class="col-md-3">
{{ partial "menu.html" . }}
</div>
</div>
{{ partial "footer.copyright.html" . }}
</div>
{{ partial "footer.html" . }}

24
examples/blog/layouts/indexes/category.html

@ -1,24 +0,0 @@
{{ partial "header.html" . }}
<body>
{{ partial "navbar.html" . }}
<div class="container">
<div class="row">
<div class="col-md-9">
<div class="well well-sm">
<strong>Items in category <code>{{ .Title | lower }}</code></strong>
<ul class="list-unstyled">
{{ range .Data.Pages }}
{{ .Render "li" }}
{{ end}}
</ul>
</div>
</div>
<!-- Sidebar -->
<div class="col-md-3">
{{ partial "menu.html" . }}
</div>
</div>
{{ partial "footer.copyright.html" . }}
</div>
{{ partial "footer.html" . }}

5
examples/blog/layouts/partials/header.html

@ -1,5 +1,6 @@
<!doctype html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
{{ partial "meta.html" . }} {{ partial "meta.html" . }}
@ -7,6 +8,6 @@
<link rel="canonical" href="{{ .Permalink }}"> <link rel="canonical" href="{{ .Permalink }}">
{{ partial "header.includes.html" . }} {{ partial "header.includes.html" . }}
{{ with .OutputFormats.Get "RSS" -}} {{ with .OutputFormats.Get "RSS" -}}
{{ printf "<link href=%q rel=\"alternate\" type=%q title=%q />" .Permalink .MediaType .Title | safeHTML }}
{{ printf "<link href=%q rel=\"alternate\" type=%q title=%q />" .Permalink .MediaType $.Site.Title | safeHTML }}
{{- end }} {{- end }}
</head>
</head>

0
examples/blog/layouts/indexes/post.html → examples/blog/layouts/post/list.html

0
examples/blog/layouts/indexes/tag.html → examples/blog/layouts/tags/list.html

Loading…
Cancel
Save