Skip to content

Commit

Permalink
added open graph tags
Browse files Browse the repository at this point in the history
  • Loading branch information
wishrohitv committed Dec 5, 2024
1 parent 2562b2f commit 1537804
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions routes/post.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ def post(urlID):
form=form,
comments=comments,
appName=APP_NAME,
blogPostUrl = request.root_url
)

case False:
Expand Down
10 changes: 10 additions & 0 deletions templates/tailwindUI/post.html.jinja
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
{% extends 'layout.html.jinja' %} {% block head %}
<!-- Set the title dynamically based on the variable 'title' -->
<title>{{ title }}</title>

<!-- open graph tags -->
<meta property="og:type" content="article" />
<meta property="og:title" content= "{{ title }}" />
<meta property="og:image" content="{{ url_for('returnPostBanner.returnPostBanner', postID = id) }}" />
<meta name="keywords" content="{{ tags }}">
<meta name="author" content="{{ author }}">
<meta property="og:url" content="{{ blogPostUrl }}" />
<meta property="og:site_name" content="{{ appName }}">

{% endblock head %} {% block body %}
<!-- Main Content Section -->
<div
Expand Down

0 comments on commit 1537804

Please sign in to comment.