-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
communities: Add noindex meta tags to unverified community pages
- Loading branch information
Showing
3 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
templates/semantic-ui/invenio_communities/details/base.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{# -*- coding: utf-8 -*- | ||
|
||
This file is part of Zenodo. | ||
Copyright (C) 2024 CERN. | ||
|
||
Zenodo is a free software; you can redistribute it and/or modify it | ||
under the terms of the MIT License; see LICENSE file for more details. | ||
#} | ||
|
||
{% extends "invenio_communities/base.html" %} | ||
|
||
{%- if community is not verified_community -%} | ||
{% set meta_robot_tags = [ | ||
{ | ||
"name": "robots", | ||
"content": "noindex, nofollow", | ||
"data-reason": ("Community is not verified" if permissions.can_moderate), | ||
} | ||
] %} | ||
{%- endif -%} | ||
|
||
{%- block javascript %} | ||
{{ super() }} | ||
{{ webpack['invenio-communities-header.js'] }} | ||
{%- endblock javascript %} | ||
|
||
{%- block page_body %} | ||
{% set community_menu_active = True %} | ||
{% include "invenio_communities/details/header.html" %} | ||
{%- endblock page_body %} |