-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgithub-pages.mk
executable file
·52 lines (42 loc) · 963 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 (c) 2017-2018 Gaël PORTAY
#
# SPDX-License-Identifier: MIT
#
# 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" >$@.tmp
echo "source 'https://rubygems.org'" >>$@.tmp
echo "gem 'github-pages', group: :jekyll_plugins" >>$@.tmp
echo "group :jekyll_plugins do" >>$@.tmp
echo " gem 'jekyll-asciidoc'" >>$@.tmp
echo "end" >>$@.tmp
cat $@.tmp >>$@
rm -f $@.tmp
.SILENT: _config.yml
_config.yml:
echo "theme: jekyll-theme-cayman" >$@.tmp
cat $@.tmp >>$@
rm -f $@.tmp
.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