From 2389cfa067afaabe4761dd7c5e7250102cd65839 Mon Sep 17 00:00:00 2001 From: Toshaan Bharvani Date: Wed, 3 Mar 2021 01:21:34 +0100 Subject: [PATCH] initial push Signed-off-by: Toshaan Bharvani --- .gitignore | 36 ++++++++++++++++++++++++++++++++++++ Makefile | 29 +++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..858f823 --- /dev/null +++ b/.gitignore @@ -0,0 +1,36 @@ +#!.gitignore + +### Hugo ### +# https://github.com/github/gitignore/tree/master/community/Golang +# gitginore template for Hugo projects +# website: https://gohugo.io + +# generated files by hugo +/public/ +/resources/_gen/ + +# executable may be added to repository +hugo.exe +hugo.darwin +hugo.linux + +## Vim +# https://github.com/github/gitignore/blob/master/Global/Vim.gitignore + +# Swap +[._]*.s[a-v][a-z] +[._]*.sw[a-p] +[._]s[a-rt-v][a-z] +[._]ss[a-gi-z] +[._]sw[a-p] + +# Session +Session.vim + +# Temporary +.netrwhist +*~ +# Auto-generated tag files +tags +# Persistent undo +[._]*.un~ diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..dc7acd0 --- /dev/null +++ b/Makefile @@ -0,0 +1,29 @@ +#!Makefile + +HUGO=hugo + +.PHONY: build serve draft clean travis netlify + +default all: build + +build: + $(HUGO) --minify + @find public/ -name '*.html' ! -name '*.gz' -type f -exec sh -c "gzip -c -9 < {} > {}.gz" \; + @find public/ -name '*.css' ! -name '*.gz' -type f -exec sh -c "gzip -c -9 < {} > {}.gz" \; + @find public/ -name '*.js' ! -name '*.gz' -type f -exec sh -c "gzip -c -9 < {} > {}.gz" \; + +travis: + $(MAKE) HUGO=./hugo build + +netlify: + $(HUGO) --minify --quiet --baseURL="$DEPLOY_PRIME_URL" + +draft: + $(HUGO) --minify --buildDrafts --buildFuture --buildExpired + +serve: + $(HUGO) server --disableFastRender --watch + +clean: + @rm -rf public/ + @rm -rf resources/