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

Added img & desc. for share link #3296

Closed
wants to merge 8 commits into from

Conversation

iitzIrFan
Copy link

Add social sharing meta tags for issue pages

  • Add Open Graph meta tags for Facebook and LinkedIn sharing
  • Add Twitter Card meta tags for Twitter sharing
  • Include fallback images and descriptions for missing screenshots
  • Truncate long descriptions for better social previews
  • Add proper site name and article type metadata
  • Load required static template tags

This enhances social sharing previews when users share issue links on
social media platforms, providing better visibility and context for
shared bug reports.

Copy link
Collaborator

@DonnieBLT DonnieBLT left a comment

Choose a reason for hiding this comment

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

Please just change the header for the one file

@@ -26,14 +33,27 @@
<link rel="canonical" href="https://{% env 'FQDN' %}/issue/{{ object.id }}">
<meta property="og:url"
content="https://{% env 'FQDN' %}/issue/{{ object.id }}" />
<meta property="og:type" content="website" />
<meta property="og:type" content="article" />
<meta property="og:site_name" content="{% env 'PROJECT_NAME' %}" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you please just keep these changes and not the other file?

Copy link
Author

Choose a reason for hiding this comment

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

Ok will update !

Copy link
Author

Choose a reason for hiding this comment

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

@DonnieBLT Have updated the changes plz chk and let me know if there are any !

Copy link
Collaborator

Choose a reason for hiding this comment

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

@iitzIrFan only the issue.html file should change

Copy link
Author

Choose a reason for hiding this comment

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

@DonnieBLT Had updated as per the requirements ! plz chk and let me know !

Copy link
Author

Choose a reason for hiding this comment

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

@DonnieBLT I had seen there is an error on deletion of issues so should I update that, also ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@DonnieBLT I had seen there is an error on deletion of issues so should I update that, also ?

That would be great!

Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe you will have to use the {% block og_title %} block tags to override the base.html template to pass the values through

@iitzIrFan iitzIrFan requested a review from DonnieBLT January 30, 2025 14:13
@@ -26,14 +33,27 @@
<link rel="canonical" href="https://{% env 'FQDN' %}/issue/{{ object.id }}">
<meta property="og:url"
content="https://{% env 'FQDN' %}/issue/{{ object.id }}" />
<meta property="og:type" content="website" />
<meta property="og:type" content="article" />
<meta property="og:site_name" content="{% env 'PROJECT_NAME' %}" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

@DonnieBLT I had seen there is an error on deletion of issues so should I update that, also ?

That would be great!

@@ -26,14 +33,27 @@
<link rel="canonical" href="https://{% env 'FQDN' %}/issue/{{ object.id }}">
<meta property="og:url"
content="https://{% env 'FQDN' %}/issue/{{ object.id }}" />
<meta property="og:type" content="website" />
<meta property="og:type" content="article" />
<meta property="og:site_name" content="{% env 'PROJECT_NAME' %}" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe you will have to use the {% block og_title %} block tags to override the base.html template to pass the values through

@@ -406,4 +406,4 @@ <h3>Liked By:</h3>
}
})
}
</script>
</script>
Copy link
Collaborator

Choose a reason for hiding this comment

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

no need for this whitespace change

Copy link
Author

Choose a reason for hiding this comment

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

no need for this whitespace change

It's just an style suggestion !

Copy link
Collaborator

Choose a reason for hiding this comment

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

It would be better in a separate pull request. This change is for code rated to the image headers

Copy link
Author

Choose a reason for hiding this comment

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

@DonnieBLT Can you specify this more for better understanding ! Also it's related to whitespace right ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, just keep this PR related to changes required for the image headers if possible. Only one file needs to change, not 3

Copy link
Author

Choose a reason for hiding this comment

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

Ok as I had changed them previously so I did this change !

@iitzIrFan iitzIrFan requested a review from DonnieBLT January 30, 2025 20:07
<meta property="og:type" content="article" />
<meta property="og:site_name" content="{% env 'PROJECT_NAME' %}" />

{% if object.screenshot %}
Copy link
Collaborator

Choose a reason for hiding this comment

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

We’d also want to check for the related screenshots as that is the new way.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Code cleanup can be a separate pr

Copy link
Collaborator

@DonnieBLT DonnieBLT left a comment

Choose a reason for hiding this comment

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

Some changes required

@iitzIrFan
Copy link
Author

@DonnieBLT
Will make a new pr for this !

@iitzIrFan iitzIrFan closed this Jan 31, 2025
@iitzIrFan iitzIrFan deleted the enhanceshare branch January 31, 2025 19:56
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