Skip to content

Commit 9176864

Browse files
committed
Add news.txt, basically just a copy from metadata blog_list
1 parent c04f687 commit 9176864

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ SRCS := $(shell find $(SRC_DIR) -name '*.md' | grep -vxF "src/index.md")
77
SRCS_CPY := $(SRC_DIR)/style.css $(SRC_DIR)/favicon.ico
88

99
BLOG_LIST_FILE := _metadata/blog_list
10+
BLOG_DATES := _metadata/blog_dates
1011
DSTS_HTML := $(SRCS:$(SRC_DIR)/%.md=$(DST_DIR)/%.html)
1112
DSTS_HTML_CPY := $(SRCS_CPY:$(SRC_DIR)/%=$(DST_DIR)/%)
1213

@@ -83,7 +84,12 @@ $(DST_DIR)/atom.xml: $(SRC_DIR)/blog/*/*.md
8384
done >> $@
8485
@echo "</feed>" >> $@
8586

86-
html: startup $(DSTS_HTML) $(DSTS_HTML_CPY) $(DST_DIR)/index.html $(DST_DIR)/atom.xml
87+
news_txt:
88+
@echo "_out/news.txt"
89+
@cat $(BLOG_LIST_FILE) | cut -f1 > $(BLOG_DATES)
90+
@paste $(BLOG_DATES) $(BLOG_LIST_FILE) | sed -e 's/^/\/blog\//' > "$(DST_DIR)/news.txt"
91+
92+
html: startup $(DSTS_HTML) $(DSTS_HTML_CPY) $(DST_DIR)/index.html $(DST_DIR)/atom.xml news_txt
8793

8894
.PHONY: all clean html
8995

0 commit comments

Comments
 (0)