pico
created pr with
pico/142.1
added pico/142.2
1: 18a25e7 ! 1: 1e9cddc style(prose): minimal design ethos
-: ------- > 2: 0967882 chore(prose): remove with_styles and layout front-matter fields
cmds
checkout latest patchset:
ssh pr.pico.sh pull pico:142 | git am -3checkout specific patchset revision:
ssh pr.pico.sh pull pico:142 [rev] | git am -3add changes to patch request:
git format-patch main --stdout | ssh pr.pico.sh pico:142add comment to patch request:
ssh pr.pico.sh comment pico:142 "lgtm!"
Patchset
pico/142.2
chore(prose): remove with_styles and layout front-matter fields
Eric Bower
2026-10-01T13:38:12ZBREAKING CHANGE: these fields will no longer work for prose blogs
Semantic diff summary
0 added,
8 modified,
0 signature changed,
0 removed
across 2 analyzed files
+33
-46
pkg/apps/prose/api.go
#
| ... | ... | @@ -41,18 +41,17 @@ type PostItemData struct { | |
| 41 | 41 | } | |
| 42 | 42 | ||
| 43 | 43 | type BlogPageData struct { | |
| 44 | - | Site shared.SitePageData | |
| 45 | - | PageTitle string | |
| 46 | - | URL template.URL | |
| 47 | - | RSSURL template.URL | |
| 48 | - | Username string | |
| 49 | - | Readme *ReadmeTxt | |
| 50 | - | Header *HeaderTxt | |
| 51 | - | Posts []PostItemData | |
| 52 | - | HasCSS bool | |
| 53 | - | WithStyles bool | |
| 54 | - | CssURL template.URL | |
| 55 | - | HasFilter bool | |
| 44 | + | Site shared.SitePageData | |
| 45 | + | PageTitle string | |
| 46 | + | URL template.URL | |
| 47 | + | RSSURL template.URL | |
| 48 | + | Username string | |
| 49 | + | Readme *ReadmeTxt | |
| 50 | + | Header *HeaderTxt | |
| 51 | + | Posts []PostItemData | |
| 52 | + | HasCSS bool | |
| 53 | + | CssURL template.URL | |
| 54 | + | HasFilter bool | |
| 56 | 55 | } | |
| 57 | 56 | ||
| 58 | 57 | type ReadPageData struct { |
| ... | ... | @@ -93,16 +91,14 @@ type PostPageData struct { | |
| 93 | 91 | } | |
| 94 | 92 | ||
| 95 | 93 | type HeaderTxt struct { | |
| 96 | - | Title string | |
| 97 | - | Bio string | |
| 98 | - | Nav []shared.Link | |
| 99 | - | HasLinks bool | |
| 100 | - | Layout string | |
| 101 | - | Image template.URL | |
| 102 | - | ImageCard string | |
| 103 | - | Favicon template.URL | |
| 104 | - | WithStyles bool | |
| 105 | - | Domain string | |
| 94 | + | Title string | |
| 95 | + | Bio string | |
| 96 | + | Nav []shared.Link | |
| 97 | + | HasLinks bool | |
| 98 | + | Image template.URL | |
| 99 | + | ImageCard string | |
| 100 | + | Favicon template.URL | |
| 101 | + | Domain string | |
| 106 | 102 | } | |
| 107 | 103 | ||
| 108 | 104 | type ReadmeTxt struct { |
| ... | ... | @@ -197,11 +193,9 @@ func blogHandler(w http.ResponseWriter, r *http.Request) { | |
| 197 | 193 | } | |
| 198 | 194 | ||
| 199 | 195 | headerTxt := &HeaderTxt{ | |
| 200 | - | Title: GetBlogName(username), | |
| 201 | - | Bio: "", | |
| 202 | - | Layout: "default", | |
| 203 | - | ImageCard: "summary", | |
| 204 | - | WithStyles: true, | |
| 196 | + | Title: GetBlogName(username), | |
| 197 | + | Bio: "", | |
| 198 | + | ImageCard: "summary", | |
| 205 | 199 | } | |
| 206 | 200 | readmeTxt := &ReadmeTxt{} | |
| 207 | 201 |
| ... | ... | @@ -212,10 +206,8 @@ func blogHandler(w http.ResponseWriter, r *http.Request) { | |
| 212 | 206 | logger.Error("readme", "err", err.Error()) | |
| 213 | 207 | } | |
| 214 | 208 | headerTxt.Bio = parsedText.Description | |
| 215 | - | headerTxt.Layout = parsedText.Layout | |
| 216 | 209 | headerTxt.Image = template.URL(parsedText.Image) | |
| 217 | 210 | headerTxt.ImageCard = parsedText.ImageCard | |
| 218 | - | headerTxt.WithStyles = parsedText.WithStyles | |
| 219 | 211 | headerTxt.Favicon = template.URL(parsedText.Favicon) | |
| 220 | 212 | if parsedText.Title != "" { | |
| 221 | 213 | headerTxt.Title = parsedText.Title |
| ... | ... | @@ -265,18 +257,17 @@ func blogHandler(w http.ResponseWriter, r *http.Request) { | |
| 265 | 257 | } | |
| 266 | 258 | ||
| 267 | 259 | data := BlogPageData{ | |
| 268 | - | Site: *cfg.GetSiteData(), | |
| 269 | - | PageTitle: headerTxt.Title, | |
| 270 | - | URL: template.URL(cfg.FullBlogURL(curl, username)), | |
| 271 | - | RSSURL: template.URL(cfg.RssBlogURL(curl, username, tag)), | |
| 272 | - | Readme: readmeTxt, | |
| 273 | - | Header: headerTxt, | |
| 274 | - | Username: username, | |
| 275 | - | Posts: postCollection, | |
| 276 | - | HasCSS: hasCSS, | |
| 277 | - | CssURL: template.URL(cfg.CssURL(username)), | |
| 278 | - | HasFilter: tag != "", | |
| 279 | - | WithStyles: headerTxt.WithStyles, | |
| 260 | + | Site: *cfg.GetSiteData(), | |
| 261 | + | PageTitle: headerTxt.Title, | |
| 262 | + | URL: template.URL(cfg.FullBlogURL(curl, username)), | |
| 263 | + | RSSURL: template.URL(cfg.RssBlogURL(curl, username, tag)), | |
| 264 | + | Readme: readmeTxt, | |
| 265 | + | Header: headerTxt, | |
| 266 | + | Username: username, | |
| 267 | + | Posts: postCollection, | |
| 268 | + | HasCSS: hasCSS, | |
| 269 | + | CssURL: template.URL(cfg.CssURL(username)), | |
| 270 | + | HasFilter: tag != "", | |
| 280 | 271 | } | |
| 281 | 272 | ||
| 282 | 273 | err = ts.Execute(w, data) |
| ... | ... | @@ -416,7 +406,6 @@ func postHandler(w http.ResponseWriter, r *http.Request) { | |
| 416 | 406 | if readmeParsed.Title != "" { | |
| 417 | 407 | blogName = readmeParsed.Title | |
| 418 | 408 | } | |
| 419 | - | withStyles = readmeParsed.WithStyles | |
| 420 | 409 | ogImage = readmeParsed.Image | |
| 421 | 410 | ogImageCard = readmeParsed.ImageCard | |
| 422 | 411 | favicon = readmeParsed.Favicon |