🔥 Frontity Share package for Frontity.
*** PLEASE STAR MY REPO TO SUPPORT OUR WORK 🙏 **
Please follow me 🙏 on twitter twitter and github
- Install the Frontity Share package as shown in the Installation steps below.
- First Way
In post.js you can use <SharingButton />
anywhere you want, for example:
const Post = ({ state, libraries }) => {
const SharingButtons = libraries.fills.share.SharingButtons;
return (
<>
<Title />
<Author />
{/** If there is a share package, show all the buttons **/}
{<SharingButtons />}
<Content />
</>
);
};
- Second Way
Put your slot inside post.js
<Slot name="After Post Content" />
Then in frontity.settings.js initialize your slot name
const settings = {
// ...
packages: [
{
name: "some-share-package",
state: {
fills: {
share: {
ShareAfterPostContent: {
slot: "After Post Content",
library: "share.SharingButtons",
},
},
},
},
},
],
};
- Do
npm install frontity-share
in the root of your project. - Add the package name in
frontity-settings.js
.
"packages": [
"frontity-share"
// other packages ...
]
- Run
npx frontity dev
again.
That's it!
This is the beta version. Some features will be added in the final release, like:
If you want to contribute to the package, you can do so following these simple steps:
- Fork this repository (https://github.com/mymakarim/frontity-share).
- Clone it in your local machine.
- Run
npm install
. - Run
npx frontity dev
. - Do the changes to the code.
- Submit the pull request! :)
- Build with love 💙, for Frontity