use base and blocks pattern instead of partials (#75)
This commit is contained in:
parent
40defd77c3
commit
283cc37f74
|
@ -0,0 +1,21 @@
|
|||
<!doctype html>
|
||||
<html lang="{{ $.Site.Language.Lang }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
||||
<base href="{{ if getenv "CONTEXT" }}{{ cond (eq "production" (getenv "CONTEXT")) (getenv "URL") (getenv "DEPLOY_PRIME_URL") }}{{ else }}{{ $.Site.BaseURL }}{{ end }}">
|
||||
<title>{{ $.Site.Title }}</title>
|
||||
<link rel="stylesheet" href="css/main.css"/>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
{{ block "header" . }}{{ partial "header" . }}{{end}}
|
||||
|
||||
{{ block "main" . }}{{end}}
|
||||
|
||||
{{ block "footer" . }}{{ partial "footer" . }}{{end}}
|
||||
|
||||
<script src="app.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,4 +1,4 @@
|
|||
{{ partial "header" . }}
|
||||
{{ define "main" }}
|
||||
|
||||
<h1>Hugo with Gulp, PostCSS and Webpack</h1>
|
||||
|
||||
|
@ -6,4 +6,4 @@
|
|||
Hooray 🎉 - you've built this with <a href="https://github.com/netlify/victor-hugo">Victor-Hugo</a>!
|
||||
</p>
|
||||
|
||||
{{ partial "footer" . }}
|
||||
{{end}}
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
<script src="app.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,10 +0,0 @@
|
|||
<!doctype html>
|
||||
<html lang="{{ $.Site.Language.Lang }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
||||
<base href="{{ if getenv "CONTEXT" }}{{ cond (eq "production" (getenv "CONTEXT")) (getenv "URL") (getenv "DEPLOY_PRIME_URL") }}{{ else }}{{ $.Site.BaseURL }}{{ end }}">
|
||||
<title>{{ $.Site.Title }}</title>
|
||||
<link rel="stylesheet" href="css/main.css"/>
|
||||
</head>
|
||||
<body>
|
Reference in New Issue