xepozz / blogit

Personal blog based on Github Pages and Github Issues.
Apache License 2.0
18 stars 3 forks source link

Vote functionality #5

Open xepozz opened 4 years ago

xepozz commented 4 years ago

Would be nice to have an ability to attach vote to a post.

I have an idea make vote based on emoji laugh, confused, heart, hooray, rocket, eyes

How to implement: 1.Whether or not a vote needs to be taken will be declared using comments.

  1. ~The format of the comment will be as follows:~
    <!--
    <vote>
    {
    {"emoji": "laugh", "label": "Option label 1"},
    {"emoji": "confused", "label": "Option label 2"},
    {"emoji": "heart", "label": "Option label 3"},
    {"emoji": "hooray", "label": "Option label 4"},
    {"emoji": "rocket", "label": "Option label 5"},
    {"emoji": "eyes", "label": "Option label 6"}
    }
    </vote>
    -->

    This format is not available, because at now blogit uses already processed markdown format (completed html). Also github markdown processor removes any comments or attributes.

  2. After receiving the content of the post, comments should be removed from the view
  3. The number of reactions can be obtained from a separate API method.
  4. In the voting statistics, you need to display count of votes and the percentage

Artifacts:

Need to research this possibility.