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

feat: Add schemaorg, og and twitter #211

Merged
merged 1 commit into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions django_wtf/core/views/index_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,21 @@ class IndexView(MetadataMixin, TemplateView):
"Django.WTF lists popular Django projects, apps and tools. "
"The latest and greatest news in the Django community."
)
keywords = [
"django",
"apps",
"packages",
"repositories",
"python",
"web",
"framework",
"apps",
"tools",
"news",
]
use_schemaorg = True
use_og = True
use_twitter = True

def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
Expand Down
10 changes: 0 additions & 10 deletions django_wtf/templates/core/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,6 @@
<html lang="en-US">
<head>
{% block head %}
<title>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These overlap and create empty extra tags...

{% block title %}
{{ title }}
{% endblock title %}
</title>
<meta name="description"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These overlap and create empty extra tags...

content="{% block description %}{{ description }}{% endblock description %}">
<meta name="keywords"
content="{% block keywords %}{{ keywords }}{% endblock keywords %}">
<meta charset="UTF-8">
{% include "meta/meta.html" %}
{% tailwind_css %}
<meta name="viewport" content="width=device-width, initial-scale=1">
Expand Down
Loading