0
0
Fork 0
Browse Source

add makefile to build and install files

This adds a makefile to build and install the files. This can be used
for an easier deployment on the page.
master
Gibheer 7 years ago
parent
commit
b38f447af7
  1. 26
      Makefile
  2. 26
      README.md

26
Makefile

@ -0,0 +1,26 @@
# install http files into this directory
HTTPDIR=/tmp/zblog
# give all files to this owner after copy
OWNER != id -u
# give all files to this group after copy
GROUP != id -g
# set this mode on all directories
DIRMODE = 554
# set this mode on all files
FILEMODE = 444
.PHONY: clean install
all: clean build
build:
hugo
clean:
-rm -r public/*
install: build
cp -r public/ $(HTTPDIR)/
find $(HTTPDIR) ! -path $(HTTPDIR) -type d -exec chmod $(DIRMODE) {} +
find $(HTTPDIR) ! -path $(HTTPDIR) -type f -exec chmod $(FILEMODE) {} +
chown -R $(OWNER):$(GROUP) $(HTTPDIR)/

26
README.md

@ -24,3 +24,29 @@ documentation
The documentation on the markdown format can be found on the [blackfriday](https://github.com/russross/blackfriday)
project page.
building and installation
-------------------------
To build and install the website, use the following commands:
```
make clean install
```
The website is built automatically into the *public/* directory.
You can also add a number of variables, to modify the installation process.
```
# install http files into this directory
HTTPDIR=/tmp/zblog
# give all files to this owner after copy
OWNER != id -u
# give all files to this group after copy
GROUP != id -g
# set this mode on all directories
DIRMODE = 554
# set this mode on all files
FILEMODE = 444
```

Loading…
Cancel
Save