Add build pipeline
This commit is contained in:
parent
631460cfd2
commit
a12b0b1f76
7 changed files with 32 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -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
|
||||||
|
|
|
@ -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
0
content/_index.md
Normal file
14
layouts/index.html
Normal file
14
layouts/index.html
Normal 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>
|
2
layouts/partials/script.html
Normal file
2
layouts/partials/script.html
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
{{ $script := resources.Get . | minify | fingerprint }}
|
||||||
|
<script type="text/javascript" src="{{ $script.RelPermalink }}" integrity="{{ $script.Data.Integrity }}"></script>
|
2
layouts/partials/style.html
Normal file
2
layouts/partials/style.html
Normal 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
9
scripts/build.sh
Executable 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
|
Reference in a new issue