diff options
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | deps.mk | 16 |
2 files changed, 14 insertions, 3 deletions
@@ -29,6 +29,7 @@ /src/content/.gitignore /src/comments/ /src/comments.sentinel +/src/comments.data !/src/comments.mastodon.json !/src/comments.lemmy.json @@ -1683,7 +1683,7 @@ FFMFLAGS = -y -hide_banner -loglevel warning mkwb feedentry $< > $@ .json.comments: - mkwb comments $< > $@ + mkwb comments -d src/comments.data $< > $@ .json.mapentry: mkwb mapentry $< > $@ @@ -1821,6 +1821,7 @@ derived-assets = \ $(sources.caslinks) \ $(sources.comments) \ src/comments.sentinel \ + src/comments.data \ $(sources.mapentry) \ src/global.json \ $(translations.txt) \ @@ -1921,8 +1922,17 @@ src/comments.sentinel: src/comments.mbox ## cannot name in advance. Which archives those are is $comments_json ## in the site's own config, written out above; a site that holds no ## such discussion names none and waits on nothing. -$(sources.comments): src/comments.sentinel $(comments.map) -$(sources.comments): $(comments.archives) +## Reading the comments is the same work whichever page asked for it +## --- every .eml parsed, every body decoded out of quoted-printable +## --- so it happens once here and the pages read what it wrote. The +## sources are named as prerequisites of the corpus alone: a page waits +## on the corpus, and the corpus waits on them. +src/comments.data: src/comments.sentinel $(comments.map) +src/comments.data: $(comments.archives) src/global.json +src/comments.data: + mkwb commentsdata src/global.json > $@ + +$(sources.comments): src/comments.data ## A page renders the thread belonging to it, and the site names ## which .comments that is, page by page. Every page waiting on |
