File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ BLOG_DATES := _metadata/blog_dates
1111DSTS_HTML := $(SRCS:$(SRC_DIR ) /%.md=$(DST_DIR ) /%.html )
1212DSTS_HTML_CPY := $(SRCS_CPY:$(SRC_DIR ) /%=$(DST_DIR ) /% )
1313
14+ FEEDS_LIMIT := 5
15+
1416all : html
1517
1618startup :
@@ -76,7 +78,7 @@ $(DST_DIR)/atom.xml: $(SRC_DIR)/blog/*/*.md
7678 @echo " <author><name>$( SITE_TITLE) </name></author>" >> $@
7779 @echo " <link rel=\" alternate\" type=\" text/html\" href=\" $( SITE_HTTPS_URL) \" />" >> $@
7880 @echo " <link rel=\" self\" type=\" application/atom+xml\" href=\" $( SITE_HTTPS_URL) atom.xml\" />" >> $@
79- @cat $(BLOG_LIST_FILE ) | while read line; do \
81+ @cat $(BLOG_LIST_FILE ) | head -n $( FEEDS_LIMIT ) | while read line; do \
8082 entry_date=$$(echo "$$line" | cut -f1 ) ; \
8183 title=$$(echo "$$line" | cut -f2 ) ; \
8284 entry_url=$$(echo "$(SITE_HTTPS_URL ) blog/$$entry_date/" ) ; \
@@ -97,7 +99,7 @@ $(DST_DIR)/atom.xml: $(SRC_DIR)/blog/*/*.md
9799news_txt :
98100 @echo " _out/news.txt"
99101 @cat $(BLOG_LIST_FILE ) | cut -f1 > $(BLOG_DATES )
100- @paste $(BLOG_DATES ) $(BLOG_LIST_FILE ) | sed -e ' s/^/\/blog\//' > " $( DST_DIR) /news.txt"
102+ @paste $(BLOG_DATES ) $(BLOG_LIST_FILE ) | sed -e ' s/^/\/blog\//' | head -n $( FEEDS_LIMIT ) > " $( DST_DIR) /news.txt"
101103
102104html : startup $(DSTS_HTML ) $(DSTS_HTML_CPY ) $(DST_DIR ) /index.html $(DST_DIR ) /atom.xml news_txt
103105
You can’t perform that action at this time.
0 commit comments