Skip to content

Instantly share code, notes, and snippets.

@seanmonstar
Created April 1, 2013 21:58
Show Gist options
  • Save seanmonstar/5288105 to your computer and use it in GitHub Desktop.
Save seanmonstar/5288105 to your computer and use it in GitHub Desktop.
Hashtags as Tag Mentions in Tent v0.3

Hashtags as Tag Mentions

Take this example post with hashtags:

Tent v0.3 is going to totally change the game when all is said and done! #tentdev

What if my client parsed this content before creating the post, and pulled out the hashtag, using this process:

  • Find #hashtags
  • For each hashtag, check to see if a tag (ex: tentdev) post exists, creating if it doesn't.
  • Making this new post mention said tag post.
  • Post!

Then, my client could check the mentions property and find all mentions to tag posts, and show some UI at the bottom of the post point out this post includes certain tags. A client could give the option to show or hide this UI, for those that don't care about tags.

This allows easy tagging/categorization from a client, without using valuable characters (with a 256 limit), and also without forcing other readers from having to consume the tags, if they don't want to.

Search

Instead of searching for hashtags requiring a full-text search, it could be broken down into this procedure:

  • User searches for #tentdev
  • Server looks up every tag post with the title "tentdev"
  • Server fetches all posts that mention one of these tag posts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment