include images in build pipeline
This commit is contained in:
parent
6164b90322
commit
673ac6b90e
11
makefile
11
makefile
|
@ -17,6 +17,7 @@ BLOG_TMP_DIR = .blogtmp
|
|||
PAGES = $(shell find $(ROOT_DIR) -wholename "$(ROOT_DIR)*.html")
|
||||
STYLES = $(shell find $(ROOT_DIR) -wholename "$(ROOT_DIR)*.css")
|
||||
BLOG_PAGES = $(shell find $(BLOG_SRC_DIR) -wholename "$(BLOG_SRC_DIR)*.md")
|
||||
BLOG_IMAGES = $(shell find $(BLOG_SRC_DIR) -wholename "$(BLOG_SRC_DIR)*.png" -o -wholename "$(BLOG_SRC_DIR)*.jpg")
|
||||
|
||||
IMAGES = $(shell find $(IMG_DIR) -wholename "$(IMG_DIR)/*.png")
|
||||
|
||||
|
@ -27,6 +28,8 @@ BLOG_INDEX = $(OUT_DIR)/blog.html
|
|||
BLOG_RSS = $(BLOG_OUT_DIR)/index.xml
|
||||
BLOG_INDEX_LINKS = $(BLOG_TMP_DIR)/blogindexlinks.html
|
||||
BLOG_TARGETS = $(BLOG_PAGES:$(BLOG_SRC_DIR)/%.md=$(BLOG_OUT_DIR)/%.html)
|
||||
BLOG_PNG_TARGETS = $(BLOG_IMAGES:$(BLOG_SRC_DIR)/%.png=$(BLOG_OUT_DIR)/%.png)
|
||||
BLOG_JPG_TARGETS = $(BLOG_IMAGES:$(BLOG_SRC_DIR)/%.jpg=$(BLOG_OUT_DIR)/%.jpg)
|
||||
|
||||
HTML_TARGETS = $(PAGES:$(ROOT_DIR)/%.html=$(OUT_DIR)/%.html)
|
||||
CSS_TARGETS = $(STYLES:$(ROOT_DIR)/%.css=$(OUT_DIR)/%.css)
|
||||
|
@ -52,7 +55,13 @@ $(OUT_DIR)/%.css: $(ROOT_DIR)/%.css $(CSS_INCLUDES) | $(OUT_DIR)
|
|||
$(OUT_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
blog: $(BLOG_TARGETS) $(BLOG_RSS) | $(BLOG_TMP_DIR)
|
||||
$(BLOG_OUT_DIR)/%.png: $(BLOG_SRC_DIR)/%.png
|
||||
cp $< $@
|
||||
|
||||
$(BLOG_OUT_DIR)/%.jpg: $(BLOG_SRC_DIR)/%.jpg
|
||||
cp $< $@
|
||||
|
||||
blog: $(BLOG_TARGETS) $(BLOG_PNG_TARGETS) $(BLOG_JPG_TARGETS) $(BLOG_RSS) | $(BLOG_TMP_DIR)
|
||||
|
||||
$(BLOG_RSS): $(BLOG_PAGES)
|
||||
pipenv run python scripts/mkblogrss.py $(BLOG_PAGES) > $@
|
||||
|
|
Loading…
Reference in New Issue