Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Makefile - github.com/marcanuy/simpleit-hugo-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bafa7b934ea60c26e85cdf5fc5a96e0e1497ae68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46

HUGO := hugo
NPM := npm
STATIC_DIR := static/
ASSETS_JS_DIR := assets/js/vendor/
ASSETS_SCSS_DIR := assets/sass/vendor/

install-npm:
	$(NPM) install
	 sudo npm install -g postcss-cli #needs to install globally 
update-npm:
	$(NPM) update
build-fontawesome:
	mkdir -p $(ASSETS_SCSS_DIR)/fontawesome
	cp -r node_modules/@fortawesome/fontawesome-free/webfonts $(STATIC_DIR)
	cp node_modules/@fortawesome/fontawesome-free/scss/* $(ASSETS_SCSS_DIR)/fontawesome
build-bootstrap:
	mkdir -p $(ASSETS_SCSS_DIR)/bootstrap/
	cp node_modules/jquery/dist/jquery.min.js $(ASSETS_JS_DIR)
	cp node_modules/popper.js/dist/umd/popper.min.js $(ASSETS_JS_DIR)
	cp node_modules/bootstrap/dist/js/bootstrap.min.js $(ASSETS_JS_DIR)
	cp -r node_modules/bootstrap/scss/* $(ASSETS_SCSS_DIR)/bootstrap/
build: build-fontawesome build-bootstrap
	HUGO_ENV=production $(HUGO) --source=exampleSite --themesDir=../..
	rm -fr resources/
	mv exampleSite/resources/ .
install: install-npm build-fontawesome build-bootstrap
	mkdir -p $(ASSETS_JS_DIR)
	mkdir -p $(ASSETS_SCSS_DIR)
update: update-npm build-fontawesome build-bootstrap
serve: clean build-fontawesome build-bootstrap
	$(HUGO) server --source=exampleSite --themesDir=../..
	rm -fr resources/
	mv exampleSite/resources/ .
serve-github-docs: clean build-fontawesome build-bootstrap
	$(HUGO) server --source=exampleSite --themesDir=../.. --config=../config-github-docs.toml
	rm -fr resources/
	mv exampleSite/resources/ .

######################
generate-githubpages: build
	rm -fr docs && HUGO_ENV=production $(HUGO) --source=exampleSite --themesDir=../.. --config=../config-github-docs.toml && mv exampleSite/public docs && touch docs/.nojekyll
clean:
	find . -name "*~" -exec rm {} -v \;
	find . -name "*#" -exec rm {} -v \;
	rm -fr exampleSite/public/