Skip to content

Commit 782c6b6

Browse files
committed
Jekyll configuration: Use only one config file for GitHub actions compatibility.
1 parent da2723c commit 782c6b6

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

Makefile

+7-6
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,22 @@ help:
2121

2222
.PHONY: jekyll-build
2323
jekyll-build:: stamp-bundler
24-
$(BUNDLE) exec jekyll build --config=_config.yml,_config-patternslib.yml
24+
$(BUNDLE) exec jekyll build --config=_config.yml
2525

2626
.PHONY: jekyll-serve
2727
jekyll-serve:: stamp-bundler ## run jekyll, serve and watch
28-
$(BUNDLE) exec jekyll serve --config=_config.yml,_config-patternslib.yml
28+
$(BUNDLE) exec jekyll serve --config=_config.yml
2929

3030
.PHONY: jekyll-serve-blank
3131
jekyll-serve-blank:: stamp-bundler ## run jekyll, serve and watch (ignoring the baseurl and host settings)
32-
$(BUNDLE) exec jekyll serve --baseurl "" --host "0.0.0.0" --config=_config.yml,_config-patternslib.yml
32+
$(BUNDLE) exec jekyll serve --baseurl "" --host "0.0.0.0" --config=_config.yml
3333

3434
.PHONY: update-patternslib
3535
update-patternslib:
3636
$(eval PATTERNSLIB_VERSION := $(shell curl https://api.github.com/repos/patternslib/Patterns/releases/latest -s | jq .tag_name -r))
37-
@printf "bundle_url: https://cdn.jsdelivr.net/npm/@patternslib/patternslib@$(PATTERNSLIB_VERSION)/dist/bundle.min.js\npatternslib_version: $(PATTERNSLIB_VERSION)\n" > _config-patternslib.yml
38-
@cat _config-patternslib.yml
37+
sed -i 's/^bundle_url.*/bundle_url: https:\/\/cdn.jsdelivr.net\/npm\/@patternslib\/patternslib@$(PATTERNSLIB_VERSION)\/dist\/bundle.min.js/g' _config.yml
38+
sed -i 's/^patternslib_version:.*/patternslib_version: $(PATTERNSLIB_VERSION)/g' _config.yml
39+
@cat _config.yml
3940
@echo # add a newline to output.
40-
-@git commit _config-patternslib.yml -m"Update Patternslib to $(PATTERNSLIB_VERSION)"
41+
-@git commit _config.yml -m"Update Patternslib to $(PATTERNSLIB_VERSION)"
4142

_config-patternslib.yml

-2
This file was deleted.

_config.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
title: Patterns
22
author: Cornelis G. A. Kolbach
33
summary: Patternslib is a free toolkit that aims to bring web design and development closer together.
4-
# bundle_url and patternslib_version are set in _config-patternslib.yml
5-
#bundle_url:
6-
#patternslib_version:
4+
# bundle_url and patternslib_version are automatically set by the Makefile target `make update-patternslib`.
5+
bundle_url:
6+
patternslib_version:
77
baseurl: /
88
domain: www.patternslib.com
99
media: /media
@@ -24,7 +24,7 @@ sass:
2424
style: :compressed
2525
load_paths:
2626
- "_sass"
27-
exclude:
27+
exclude:
2828
- Gemfile
2929
- Gemfile.lock
3030
- config.codekit

0 commit comments

Comments
 (0)