0.1.5 • Published 4 years ago

frontity-share v0.1.5

Weekly downloads
1
License
GNU GPL 2
Repository
github
Last release
4 years ago

Frontity ShareButtons :art:

:fire: 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.

npm.io

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 :wrench:

  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 :clipboard:

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 :white_flower:

  • Build with love :blue_heart:, for Frontity

Authors

  1. Yahya Makarim
  2. CodeNawis

Contributors

  1. mymakarim - Leed Developer @frontity

License :scroll:

License: GPL v2