frontity-share

0.1.5 • Public • Published

Frontity ShareButtons 🎨

🔥 Frontity Share package for Frontity.

*** PLEASE STAR MY REPO TO SUPPORT OUR WORK 🙏 **

Please follow me 🙏 on twitter twitter and github

Below is the screentshot taken with Frontity codenawis theme with some added styles.

How does it work?

  1. 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",
            },
          },
        },
      },
    },
  ],
};
 

Installation 🔧

  1. Do npm install frontity-share in the root of your project.
  2. Add the package name in frontity-settings.js.
"packages": [
  "frontity-share"
  // other packages ...
]
  1. Run npx frontity dev again.

That's it!

More info 📋

This is the beta version. Some features will be added in the final release, like:

Contribute to the package

If you want to contribute to the package, you can do so following these simple steps:

  1. Fork this repository (https://github.com/mymakarim/frontity-share).
  2. Clone it in your local machine.
  3. Run npm install.
  4. Run npx frontity dev.
  5. Do the changes to the code.
  6. Submit the pull request! :)

Credits 💮

Authors

  1. Yahya Makarim
  2. CodeNawis

Contributors

  1. mymakarim - Leed Developer @frontity

License 📜

License: GPL v2

Package Sidebar

Install

npm i frontity-share

Weekly Downloads

1

Version

0.1.5

License

GNU GPL 2

Unpacked Size

7.06 kB

Total Files

4

Last publish

Collaborators

  • componentity