Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for partial entry content in a feed context #28

Open
fluffy-critter opened this issue May 25, 2022 · 0 comments
Open

Support for partial entry content in a feed context #28

fluffy-critter opened this issue May 25, 2022 · 0 comments

Comments

@fluffy-critter
Copy link

fluffy-critter commented May 25, 2022

Per conversation at https://chat.indieweb.org/dev/2022-05-25#t1653503966140000

The problem to solve

h-entry is implied to be either a summary (via p-summary) or the full entry content (via e-content). However, in a lot of contexts it's desirable to only have the preamble to a post visible from a feed page and a link to the extended content.

In particular, it may be desirable for a blog to not present the full content within its h-feed due to things like content length, or the inclusion of images or video that would generate a large bandwidth or resource burden (for example, a photo gallery with multiple large albums), or wanting to separate extended content from the feed itself due to its sensitive nature (for example, discussions of trauma or potentially triggering/objectionable/NSFW content).

Additionally, a feed context may purposefully redact or reduce image content for various reasons, such as a webcomic which only displays the first panel or a low-resolution preview within its feed to encourage readers to view it within the context of the website.

Prior art

Blog engines: "body" vs "more"

Several blog engines such as Movable Type, Wordpress, Tumblr, and Publ express the ability to have an explicit separation of preamble content vs. "below-the-fold" content. Typically this is implemented by having two text sections for any entry, and it is up to the page render templates to handle this conditionally.

For example, in a typical Publ blog, the "index" template appears as something like:

{{entry.body}}

{% if entry.more %}
<a href="{{entry.link}}">Read more...</a>
{% endif %}

However, it's up to the blog template to decide on the specific presentation, or whether the "more text" is even used as below-the-fold content in the first place.

LiveJournal/Dreamwidth

LJ and Dreamwidth support extended content in a slightly different way, where the entry text is all stored in a single content chunk but there's the concept of a "cut," which is conceptually similar to HTML's <detail> tag. For example, on LiveJournal, an entry could contain text like:

Main-page content blah blah blah

<lj-cut "An aside">
Here's some more extended rambling about a specific topic
</lj-cut>

More main-page content

The presentation of content like this would essentially show the stuff outside of the <lj-cut> tags on readers' feeds, and then any <lj-cut> would appear as something like

Main-page content blah blah blah

<a href="entry-permalink#cut-1">An aside</a>

More main-page content

In this way, an entry could have arbitrarily many of these "cuts," and by going to the individual entry page you see all the content inline, while you'd only see an elided summary from your friend feed.

Proposed solution

Adding an additional microformat such as u-continued seems to cover all of these use cases. For example, in the simple preamble/continued case:

<article class="h-entry>
<p>Hello.</p>

<p><a class="u-continued" href="entry.html#more">Continued!</a></p>
</article>

and in the LiveJournal-style "cut" case:

<article class="h-entry">
<p>This is some main page content.</p>

<p><a class="u-continued" href="entry.html#more">Read more (an aside)</a></p>

<p>Here is some more main page content.</p>

...

This would allow a social reader to provide a user experience that indicates that the feed item is only partial content, or could even be used as a cue to the reader to retrieve the full text of the entry from its u-url (if it matches the u-continued URL minus the fragment, anyway).

This mechanism would also naturally handle things like sensitive content per #19 and #27; for example:

<a class="u-continued" href="entry.html">Read more (Content warning: butts)</a>

(although this should be orthogonal/in addition to a specific content warning mechanism)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants