-
Notifications
You must be signed in to change notification settings - Fork 2
/
github-pages.mk
executable file
·52 lines (42 loc) · 973 Bytes
/
github-pages.mk
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
47
48
49
50
51
52
#!/usr/bin/make -f
#
# Copyright 2017-2018 Gaël PORTAY
#
# SPDX-License-Identifier: LGPL-2.1-or-later
#
# See: https://help.github.com/articles/setting-up-your-github-pages-site-locally-with-jekyll/
.PHONY: all
all: exec
.SILENT: Gemfile
Gemfile:
echo "# GitHub Pages" >[email protected]
echo "source 'https://rubygems.org'" >>[email protected]
echo "gem 'github-pages', group: :jekyll_plugins" >>[email protected]
echo "group :jekyll_plugins do" >>[email protected]
echo " gem 'jekyll-asciidoc'" >>[email protected]
echo "end" >>[email protected]
cat [email protected] >>$@
rm -f [email protected]
.SILENT: _config.yml
_config.yml:
echo "theme: jekyll-theme-cayman" >[email protected]
cat [email protected] >>$@
rm -f [email protected]
.PHONY: exec
exec: bundle-exec
.PHONY: update
update: bundle-update
.SILENT: install
.PHONY: install
install:
gem install bundler
.PHONY: clean
clean:
rm -Rf _site
bundle-install:
bundle-exec: _config.yml
bundle-exec: override BUNDLEFLAGS+=jekyll serve
bundle-update:
bundle-%: Gemfile
bundle $* $(BUNDLEFLAGS)
# ex: filetype=make