-
-
Save funraise-af/fca753f07a253d70d998970433db9da0 to your computer and use it in GitHub Desktop.
Makefiles to handle Jekyll websites https://simpleit.rocks/how-to-add-bootstrap-4-to-jekyll-the-right-way/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SHELL := /bin/bash | |
YARN := yarn | |
VENDOR_DIR = assets/vendor/ | |
JEKYLL := jekyll | |
PROJECT_DEPS := package.json | |
.PHONY: all clean install update | |
all : serve | |
check: | |
$(JEKYLL) doctor | |
$(HTMLPROOF) --check-html \ | |
--http-status-ignore 999 \ | |
--internal-domains localhost:4000 \ | |
--assume-extension \ | |
_site | |
install: $(PROJECT_DEPS) | |
$(YARN) install | |
update: $(PROJECT_DEPS) | |
$(YARN) upgrade | |
include-yarn-deps: | |
mkdir -p $(VENDOR_DIR) | |
cp node_modules/jquery/dist/jquery.min.js $(VENDOR_DIR) | |
cp node_modules/popper.js/dist/umd/popper.min.js $(VENDOR_DIR) | |
cp node_modules/bootstrap/dist/js/bootstrap.min.js $(VENDOR_DIR) | |
build: install include-yarn-deps | |
$(JEKYLL) build | |
serve: install include-yarn-deps | |
JEKYLL_ENV=production $(JEKYLL) serve |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SHELL := /bin/bash | |
BUNDLE := bundle | |
YARN := yarn | |
VENDOR_DIR = assets/vendor/ | |
JEKYLL := $(BUNDLE) exec jekyll | |
PROJECT_DEPS := Gemfile package.json | |
.PHONY: all clean install update | |
all : serve | |
check: | |
$(JEKYLL) doctor | |
$(HTMLPROOF) --check-html \ | |
--http-status-ignore 999 \ | |
--internal-domains localhost:4000 \ | |
--assume-extension \ | |
_site | |
install: $(PROJECT_DEPS) | |
$(BUNDLE) install --path vendor/bundler | |
$(YARN) install | |
update: $(PROJECT_DEPS) | |
$(BUNDLE) update | |
$(YARN) upgrade | |
include-yarn-deps: | |
mkdir -p $(VENDOR_DIR) | |
cp node_modules/jquery/dist/jquery.min.js $(VENDOR_DIR) | |
cp node_modules/popper.js/dist/umd/popper.min.js $(VENDOR_DIR) | |
cp node_modules/bootstrap/dist/js/bootstrap.min.js $(VENDOR_DIR) | |
build: install include-yarn-deps | |
$(JEKYLL) build | |
serve: install include-yarn-deps | |
JEKYLL_ENV=production $(JEKYLL) serve |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment