alexandrevicenzi / Flex

The minimalist Pelican theme.
https://flex.alxd.me
MIT License
606 stars 330 forks source link

Add support for share_post plugin #275

Open radoeka opened 3 years ago

radoeka commented 3 years ago

Attached is a patch to add support for the share_post plugin.

This plugin creates old-school URLs for some popular sites, without the need to create a login with a 3rd party (like add_this).

Would be nice if this can be added to Flex. There is support for twitter, email, facebook, reddit and linkedin.

The icons are displayed next to info line (under the title), at the article page as well as at the index page. Example: image

share_post.zip

Patch can be applied with: patch -p1 < share_post.patch, from the top directory.

Additional information

# SHARE_POST = True must be set to really enable this plugin
# When more socials are to be added, Use https://iconmonstr.com/
# to obtain the corresponding svg icon code.
alexandrevicenzi commented 3 years ago

Feel free to send this as a pull request, but disqus and addthis plugins have a similar function.

Also, I would rather leave the share buttons to the end of the article, and not below the title.

radoeka commented 3 years ago

disqus and addthis plugins have a similar function.

I know, but as stated, share_post does not require a login with a 3rd party. It makes Flex more versatile. One can either opt for share_post of add_this. Both at the same time is not logical.

What's your rationale to put it at the end of the article? /just wondering

I tried it first at the end of the article, but it became too busy, as there are the tag labels already and as I've 'neighbors' active also the next -, and previous article buttons. But, that proves it can be done ;)

When placed at the end of the article, what should be the order:

Vertical, what should go first?

  1. Tag labels
  2. Share_post icons
  3. Neighbors (previous and next article buttons)

Horizontal: left, center or at the right side?

I opt for vertical, as described above and horizontal in the center.

About the PR: I would have done so, if I knew the steps how to make a PR. Can you provide the steps to make a pull request (I don't have write permission to the Flex repository), please.

alexandrevicenzi commented 3 years ago

disqus and addthis plugins have a similar function.

I know, but as stated, share_post does not require a login with a 3rd party. It makes Flex more versatile. One can either opt for share_post of add_this. Both at the same time is not logical.

What's your rationale to put it at the end of the article? /just wondering

Very simple, one needs to read the article before sharing, so what is the reason to put share buttons on the top? If the article is good, one will share it at the end of it.

I tried it first at the end of the article, but it became too busy, as there are the tag labels already and as I've 'neighbors' active also the next -, and previous article buttons. But, that proves it can be done ;)

When placed at the end of the article, what should be the order:

Vertical, what should go first?

  1. Tag labels
  2. Share_post icons
  3. Neighbors (previous and next article buttons)

Horizontal: left, center or at the right side?

I opt for vertical, as described above and horizontal in the center.

How about like this:

image

Tags Share buttons centered Everything else (neighbors, comments)

It becomes busy if you have all those plugins enabled.

About the PR: I would have done so, if I knew the steps how to make a PR. Can you provide the steps to make a pull request (I don't have write permission to the Flex repository), please.

You need to fork this repository, do the changes on your fork, and submit a PR from your fork to this repo. Everything can be done using the website, no apps are needed, except Git itself.