BinaryJazz / genrenator

Random genre creation
https://binaryjazz.us/genrenator-api/
GNU General Public License v3.0
11 stars 0 forks source link

Add sharing functions for shortcode #11

Closed jazzsequence closed 6 years ago

jazzsequence commented 6 years ago

I want to be able to do two things:

  1. Revisit a specific genre or genre story so I can show it to someone else
  2. Share that genre on Twitter with a link

For 1. this can be accomplished by looking for a query parameter in the URL. The shortcode can provide a link to the page it's on plus the genre with spacers between the words (%20 is obvious but it might be more readable if we did something like +, e.g. binaryjazz.us/genrenator/?genre=disco+indie).

Instead of just outputting the result of the genre creation logic, the shortcodes can look for ?genre= or ?story= in the URL. If they are there, they can just return a sanitized version of the string in the URL instead of getting a random genre.

The share on twitter functionality will simply link to a new tweet pop up with that URL and genre story as the text. For genres, we can have something like "Check out this new genre:" or else generate a random genre story and insert the genre into it and tweet that.

This is the main feature I want to add to 1.1 besides bugfixes.