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
Event page: Add keywords to metadata in header #3262
Conversation
@@ -2,3 +2,6 @@ | |||
<meta property="og:image" content="{{ event.logo_url if event.has_logo else | |||
(indico_config.IMAGES_BASE_URL + '/logo_indico.png') }}"> | |||
<meta property="og:description" content="{{ event.description|striptags|truncate(500) }}"> | |||
{%- if event.keywords -%} | |||
<meta keywords="{{ event.keywords|join(',') }}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the correct syntax is <meta name="keywords" value="...">
This line should be indented (we care about readable templates, even if this makes the final HTML output uglier).
Also, I think right now this ends up right behind the og:description
line without a linebreak, so I would replace the -%}
with %}
or {%-
with {%}
(the -
strips whitespace on the side where it is).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
CHANGES.rst
Outdated
@@ -65,6 +65,7 @@ Improvements | |||
reviewing | |||
- Show a nicer error message when entering an excessively high base | |||
registration fee (:issue:`3260`) | |||
- Add the keywords as meta tag to the page header(thanks :user:`bpedersen2`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space, and IMHO this can be a bit more concise:
- Expose event keywords through an HTML meta tag (:issue:`3262`, thanks
:user:`bpedersen2`)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There's a double space in your commit message (between |
Currently the assigned keywords are only use in some calendar views, but for search engines they should also be provided in the keywords meta header.
Currently the assigned keywords are only use in some calendar views,
but for search engines they should also be provided in the keywords
meta header.