So I'm improving Article display in Hometown.
-
So I'm improving Article display in Hometown.
@julian made this post:https://community.nodebb.org/post/105824 · BrowserPub · A browser for exploring ActivityPub and the fediverse
Explore the open social web through the lens of ActivityPub and the fediverse.
(browser.pub)
`content` and `summary` are ALMOST the same, so my software renders repeated content. I'd like to be able to say "if content and summary are the same, then default to one of them and exclude the other". Now the only difference seems to be a newline, so maybe I just trim whitespace but... thoughts? Is this good use of `summary` by nodebb in the first place?
-
So I'm improving Article display in Hometown.
@julian made this post:https://community.nodebb.org/post/105824 · BrowserPub · A browser for exploring ActivityPub and the fediverse
Explore the open social web through the lens of ActivityPub and the fediverse.
(browser.pub)
`content` and `summary` are ALMOST the same, so my software renders repeated content. I'd like to be able to say "if content and summary are the same, then default to one of them and exclude the other". Now the only difference seems to be a newline, so maybe I just trim whitespace but... thoughts? Is this good use of `summary` by nodebb in the first place?
@darius @julian @technical-discussion interestingly https://indieweb.org/post-type-discovery#Algorithm suggests that you check if the `name` is a prefix of `content`, and if it is, then it is a Note. perhaps similar logic can be used to check if `summary` is a prefix of `content` in some way?
i don't think this is particularly *wrong*, as generating summaries from excerpts of content is a common pattern in e.g. static site generators like Hugo. it is indeed duplicative, though!
-
@darius @julian @technical-discussion interestingly https://indieweb.org/post-type-discovery#Algorithm suggests that you check if the `name` is a prefix of `content`, and if it is, then it is a Note. perhaps similar logic can be used to check if `summary` is a prefix of `content` in some way?
i don't think this is particularly *wrong*, as generating summaries from excerpts of content is a common pattern in e.g. static site generators like Hugo. it is indeed duplicative, though!
@darius @julian @technical-discussion one thing this suggests is that there is a semantic difference between "summary" in the sense of providing a short blurb that is additive to the content (kinda like a subheading!), vs "summary" in the sense of providing an excerpt to be used as a kind of preview (as in a list of articles)