LESSWRONG
LW

Site Meta
Personal Blog

28

'Next post' and 'Previous post' links for posts in a sequence

by lukeprog
26th Nov 2011
1 min read
7

28

Site Meta
Personal Blog

28

'Next post' and 'Previous post' links for posts in a sequence
4Richard_Kennaway
3Solvent
1kilobug
1DanielLC
1Grognor
0lukeprog
3Vladimir_Nesov
New Comment
7 comments, sorted by
top scoring
Click to highlight new comments since: Today at 5:13 AM
[-]Richard_Kennaway14y40

Maybe there could (also) be automatically generated "referenced by" links, whenever a later post refers to an earlier one. Or would that produce too many links?

Reply
[-]Solvent14y30

Incidentally, why aren't you an editor, Luke?

Reply
[-]kilobug14y10

Great idea, but couldn't we have it automatically generated ? Like a field "previous" in the edit form, and when filled, it automatically adds the "previous post" link on the article, and the "next post" on the referenced one ? So we are sure the next/previous links are always synced ?

Reply
[-]DanielLC14y10

While we're at it, how about "random post", or even "random unread post"? In fact, I suggest adding a list of random posts after the recent posts.

Reply
[-]Grognor14y10

I pretty well think there should be responses by other people place in articles as well. Like Yvain's partial-response to this post. Maybe that's not the best example, but you get the idea, yeah?

Reply
[-]lukeprog14y00

The actual code I meant to paste is here. LW won't let me show the hard-space code even when I use

, apparently.

Reply
[-]Vladimir_Nesov14y30

I couldn't get articles to show  's either, but the code as posted is equivalent to the code you meant to post, so there is no point (as you can see, you could include them in a comment directly).

The empty newlines make sense before footnotes in your post (maybe just one newline, not two), but would be bad at the end of a post, and I'd make it more compact, like this:

<p align="right"><br />
Next post: <a href=""></a><br />
Previous post: <a href=""></p>

(I'm not sure about the right-alignment thing, maybe left-aligned it would look better.)

There is also "article navigation" LW feature that was intended to do what you describe, and even included parsing of wiki articles that list posts in a sequence, but was never polished enough to become particularly usable. And if sequences are consistently tagged by sequence-identifying tags, it can actually be used, though it's not prominent enough to be noticed (click "Article Navigation" at the end of a post to access this feature).

Reply
Moderation Log
More from lukeprog
View more
Curated and popular this week
7Comments

Less Wrong would be stickier if there were links at the bottom of each post in The Sequences to the next and previous posts in that sequence.

I just added those links for each post in my own sequences: The Science of Winning at Life, Rationality and Philosophy, and No-Nonsense Metaethics.

I can't do that for sequences written by somebody else. Perhaps one or more of the LW editors would be willing to start hacking away on that project?

Here's the algorithm I executed:

  1. Open all the posts from one sequence, in order, in browser tabs.
  2. Go to first post in the sequence.
  3. Click 'Edit'.
  4. Click 'HTML' and uncheck 'Word Wrap.'
  5. Scroll to the bottom of the post (not counting notes and references) and paste in the following:

    <p>&nbsp;</p>
    <p align="right">Next post: <a href=""></a></p>
    <p align="right">Previous post: <a href=""></a></p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>

  6. If post is first in sequence, remove 'Previous post' line.
  7. If post is last in sequence, remove 'Next post' line.
  8. Paste in URL and post title for remaining 'Next post' or 'Previous post' lines of HTML.
  9. Click 'Update', then click 'Submit'.
  10. If this is the last post in the sequence, return 0. Else, move to next post in sequence and go to step #3.