Skip to content

Easy integration for people love your work ❤️

Notifications You must be signed in to change notification settings

gil0mendes/love-page

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Page Loves

A non-configuration button for allowing users to love your web pages and blog posts.

Simplest example

The button is a custom element that can be added directly to the page. Below there is a minimal example:

<head>
  <!-- add the button script -->
  <script src="dist/love-page.js"></script>
</head>
<body>
  <!-- add the button -->
  <love-page url="example.com/my-page" />
</body>

The above will render a love button, persisting loves counts per url.

Development

Clone the repo and install dependencies via pnpm:

pnpm

The project uses Vite for development, all the code can be found on the src directory. To start the development server run the command:

pnpm dev