Skip to content

Commit bf50489

Browse files
committed
website: stop emitting the stray /2026 dated post
src/_posts/index.md exists only to drive hexo-generator-index (the homepage), but Hexo also rendered it as a dated post at /2026/06/21/index/ — unlinked, empty, indexable junk. Pin that post to a fixed permalink and strip it after generate in the Makefile, keeping the homepage intact.
1 parent dd5e8bd commit bf50489

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

website/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ all: clean
1212
cp -r ../code ./src/modern-cpp/
1313
npx hexo generate
1414
mv public/index.html public/modern-cpp/index.html
15+
rm -rf public/_generated_home_stub
1516
s: all
1617
node_modules/serve/bin/serve.js ./public
1718
clean:

website/src/_posts/index.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
---
22
index: true
33
type: book-zh-cn
4+
# This file only exists to drive hexo-generator-index (the homepage). Hexo also
5+
# renders it as a standalone post; pin that copy to a fixed path so the build
6+
# can strip it deterministically (see website/Makefile) instead of leaving a
7+
# stray dated permalink like /2026/06/21/index/.
8+
permalink: _generated_home_stub/index.html
9+
date: 2016-01-01 00:00:00
410
---

0 commit comments

Comments
 (0)