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 og and twitter metadata #293

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
13 changes: 13 additions & 0 deletions theme/apache/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,19 @@
<meta name="msapplication-config" content="/favicons/browserconfig.xml">
<meta name="theme-color" content="#282661">

<meta property="og:url" content="https://www.apache.org/">
<meta property="og:type" content="website">
<meta property="og:title" content="{{ page.title }}">
<meta property="og:description" content="Home page of The Apache Software Foundation">
Copy link
Member

@rlenferink rlenferink Aug 17, 2023

Choose a reason for hiding this comment

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

This base.html is used as template for multiple pages besides the home page. Maybe this description can be made more generic (or using an auto generated page description maybe) ?

Copy link
Author

Choose a reason for hiding this comment

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

I have added the support to give descriptions from individual pages just like title. I have also put a description in siteindex page in-order to test it. @rlenferink if you could update the branch.

<meta property="og:image" content="https://www.apache.org/foundation/press/kit/asf-estd-1999-logo.svg">

<meta name="twitter:card" content="summary_large_image">
<meta property="twitter:domain" content="apache.org">
<meta property="twitter:url" content="https://www.apache.org/">
<meta name="twitter:title" content="{{ page.title }}">
<meta name="twitter:description" content="Home page of The Apache Software Foundation">
<meta name="twitter:image" content="https://www.apache.org/foundation/press/kit/asf-estd-1999-logo.svg">

<title>{{ page.title }}</title>
<link href="/css/Montserrat-300-600.css" rel="stylesheet">
<link href="/css/min.bootstrap.css" rel="stylesheet">
Expand Down