Gatsby Theme Like Button
A small gatsby theme which helps to add a like button to any post or page on the website.
This is built using monorepo.
gatsby-theme-like-post: a main theme where we keep the functionality of the button
site: contains a dummy site to test the theme
Currently when user clicks on the button, it stores the given post id into the localstorage with boolean flag about the liked state.
How to run?
yarnto install all the required packages
yarn workspace gatsby-theme-like-post developto test whether everything works without any compile issue
- Kill the process
yarn workspace site developto launch our dummy site
Currently, the dummy site contains 2 pages
about with the
LikeButton component added from the theme.
- Connect with firebase
- Allow users to customize the style of button
- Publish to npm
I gave a talk in React Knowledgable meetup in Singapore to show how we can build a gatsby theme. The details are as follows: