1
Fork 0

Add build pipeline

This commit is contained in:
Jake Howard 2019-01-11 17:17:11 +00:00
parent 631460cfd2
commit a12b0b1f76
Signed by: jake
GPG key ID: 57AFB45680EDD477
7 changed files with 32 additions and 2 deletions

1
.gitignore vendored
View file

@ -99,3 +99,4 @@ typings/
.dynamodb/ .dynamodb/
# End of https://www.gitignore.io/api/node,hugo # End of https://www.gitignore.io/api/node,hugo
static/build

View file

@ -1,11 +1,13 @@
baseURL: http://example.org/ baseURL: http://example.org/
title: My New Hugo Site title: My New Hugo Site
staticDir: staticDir: static/build
- node_modules/materialize-css/dist assetDir: static/build
disableKinds: disableKinds:
- sitemap - sitemap
- taxonomyTerm
- 404
outputs: outputs:
home: home:

0
content/_index.md Normal file
View file

14
layouts/index.html Normal file
View file

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Page Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
{{ partial "style.html" "css/materialize.css" }}
</head>
<body>
{{ partial "script.html" "js/materialize.js" }}
</body>
</html>

View file

@ -0,0 +1,2 @@
{{ $script := resources.Get . | minify | fingerprint }}
<script type="text/javascript" src="{{ $script.RelPermalink }}" integrity="{{ $script.Data.Integrity }}"></script>

View file

@ -0,0 +1,2 @@
{{ $style := resources.Get . | toCSS | minify | fingerprint }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}" integrity="{{ $style.Data.Integrity }}" />

9
scripts/build.sh Executable file
View file

@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -e
mkdir -p static/build
cp -r node_modules/materialize-css/dist/* static/build/
hugo -v