Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Hashtags to Share Urls #100

Merged
merged 10 commits into from
Apr 5, 2020
Merged

Add Hashtags to Share Urls #100

merged 10 commits into from
Apr 5, 2020

Conversation

Syralist
Copy link
Contributor

@Syralist Syralist commented Apr 4, 2020

Twitter and Facebook allow the addition of hashtags to the share urls, so I added this to the "post-share" partial. It takes the posts tags and appends them to the Urls.
Twitter allows a list of tags, Facebook only allows one tag.
It works but I don't know if the code is good.

@reuixiy
Copy link
Owner

reuixiy commented Apr 5, 2020

Yup, it's great!

@reuixiy
Copy link
Owner

reuixiy commented Apr 5, 2020

@Syralist I made some adjustments and I'm going to merge this PR if there is no problem.

Looks like hyphen(-) will make hashtag failed on Twitter.
Copy link
Contributor Author

@Syralist Syralist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used this to preserve the capitalization in the tags. I thought this to be better than all lowercase.

@reuixiy
Copy link
Owner

reuixiy commented Apr 5, 2020

Okay, I just tested that. Seems like Hugo has some kind of "magic", which converts .Param.tags to lowercase...

@Syralist
Copy link
Contributor Author

Syralist commented Apr 5, 2020

Yes, I guess the .Param.tags works for the urls to the respective pages. The code I copied comes from the post-tags partial.

@reuixiy
Copy link
Owner

reuixiy commented Apr 5, 2020

So I'm going to merge this PR now. Do you have any other suggestions?

@Syralist
Copy link
Contributor Author

Syralist commented Apr 5, 2020

No suggestions at the moment. :)

@reuixiy reuixiy merged commit 46feb95 into reuixiy:master Apr 5, 2020
reuixiy pushed a commit that referenced this pull request Apr 5, 2020
ulmefors pushed a commit to ulmefors/hugo-theme-meme that referenced this pull request Nov 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants