summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaria Carolin Chabowski <laria@laria.me>2021-01-03 22:55:25 +0100
committerLaria Carolin Chabowski <laria@laria.me>2021-01-03 22:55:25 +0100
commit8d4c20913338207b2b55c3441b7a27eaef793482 (patch)
treef858d8ee32373b54f578ea525f0ac611c9ed3da5
parent97ccbcecfc63efcc30742c2014b5a017db5b41d3 (diff)
downloadlaria.me-8d4c20913338207b2b55c3441b7a27eaef793482.tar.gz
laria.me-8d4c20913338207b2b55c3441b7a27eaef793482.tar.bz2
laria.me-8d4c20913338207b2b55c3441b7a27eaef793482.zip
handleArchiveDay: Only show excerpts
-rw-r--r--serve.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/serve.go b/serve.go
index 4f3aef8..3883d9a 100644
--- a/serve.go
+++ b/serve.go
@@ -427,7 +427,13 @@ func (ctx *serveContext) handleArchiveDay(w http.ResponseWriter, r *http.Request
day, _ := strconv.Atoi(vars["day"])
articles, _, err := viewArticlesFromDb(db, 1, `
- SELECT article_id, published, slug, title, full_html, 0 AS ReadMore
+ SELECT
+ article_id,
+ published,
+ slug,
+ title,
+ IF(summary_html = '', full_html, summary_html),
+ summary_html != '' AS ReadMore
FROM article
WHERE
YEAR(published) = ?