Skip to content

mymakarim/frontity-share

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

10 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

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 ๐Ÿ’ฎ

  • Build with love ๐Ÿ’™, for Frontity

Authors

  1. Yahya Makarim
  2. CodeNawis

Contributors

  1. mymakarim - Leed Developer @frontity

License ๐Ÿ“œ

License: GPL v2

About

๐Ÿ˜ Share package for Frontity (Sharing Buttons)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published