Browse Source

Using shortcodes instead of abusing layouts

master
Mobius K 10 months ago
parent
commit
4e8b8542cb
  1. 3
      content/_index.html
  2. 15
      layouts/index.html
  3. 9
      layouts/shortcodes/content.html

3
content/_index.html

@ -1,3 +1,6 @@
---
title: Portfolio
layout: single
---
{{< content >}}

15
layouts/index.html

@ -1,15 +0,0 @@
{{ define "main" }}
<ul id="tab-content" class="uk-switcher">
{{ $context := . }}
{{ range .Site.Data.content.tabs }}
{{ $content := print .link ".html" }}
<li>
{{ partial $content $context }}
</li>
{{ end }}
</ul>
{{ .Content }}
{{ end }}

9
layouts/shortcodes/content.html

@ -0,0 +1,9 @@
<ul id="tab-content" class="uk-switcher">
{{ $context := . }}
{{ range .Site.Data.content.tabs }}
{{ $content := print .link ".html" }}
<li>
{{ partial $content $context }}
</li>
{{ end }}
</ul>
Loading…
Cancel
Save