mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
DS-2962
This commit is contained in:
@@ -177,7 +177,7 @@
|
||||
</xsl:attribute>
|
||||
</meta>
|
||||
|
||||
<xsl:if test="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='ROBOTS']">
|
||||
<xsl:if test="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='ROBOTS'][not(@qualifier)]">
|
||||
<meta name="ROBOTS">
|
||||
<xsl:attribute name="content">
|
||||
<xsl:value-of select="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='ROBOTS']"/>
|
||||
|
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* The contents of this file are subject to the license and copyright
|
||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
||||
* tree and available online at
|
||||
*
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
package org.dspace.app.xmlui.aspect.discovery;
|
||||
|
||||
import java.io.*;
|
||||
@@ -10,6 +17,10 @@ import org.dspace.authorize.*;
|
||||
import org.xml.sax.*;
|
||||
|
||||
/**
|
||||
* Robots can not be blocked from dynamic URLs using robots.txt. This transformer is used instead to add
|
||||
* a meta tag that tells robots not to index the content of a page.
|
||||
* Information about this meta tag can be found here: http://www.robotstxt.org/meta.html
|
||||
*
|
||||
* @author philip at atmire.com
|
||||
*/
|
||||
public class RobotsNoIndexTransformer extends AbstractDSpaceTransformer {
|
||||
|
@@ -159,12 +159,16 @@ and the recent submissions listing
|
||||
<map:parameter name="javascript.static#1" value="loadJQuery.js"/>
|
||||
<map:parameter name="javascript.static#2" value="static/js/discovery/search-controls.js"/>
|
||||
</map:transform>
|
||||
|
||||
<!--adds the "no index" robots meta tag to the page-->
|
||||
<map:transform type="RobotsNoIndexTransformer"/>
|
||||
<map:serialize type="xml"/>
|
||||
</map:match>
|
||||
|
||||
<map:match pattern="handle/*/*/search-filter">
|
||||
<map:transform type="SearchFacetFilter"/>
|
||||
|
||||
<!--adds the "no index" robots meta tag to the page-->
|
||||
<map:transform type="RobotsNoIndexTransformer"/>
|
||||
<map:serialize type="xml"/>
|
||||
</map:match>
|
||||
|
@@ -11,9 +11,8 @@ Sitemap: ${dspace.url}/htmlmap
|
||||
User-agent: *
|
||||
# Disable access to Discovery search and filters
|
||||
Disallow: /discover
|
||||
Disallow: /handle/${handle.prefix}/*/discover
|
||||
Disallow: /search-filter
|
||||
Disallow: /handle/${handle.prefix}/*/search-filter
|
||||
|
||||
#
|
||||
# Optionally uncomment the following line ONLY if sitemaps are working
|
||||
# and you have verified that your site is being indexed correctly.
|
||||
|
@@ -168,7 +168,7 @@
|
||||
</xsl:attribute>
|
||||
</meta>
|
||||
|
||||
<xsl:if test="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='ROBOTS']">
|
||||
<xsl:if test="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='ROBOTS'][not(@qualifier)]">
|
||||
<meta name="ROBOTS">
|
||||
<xsl:attribute name="content">
|
||||
<xsl:value-of select="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='ROBOTS']"/>
|
||||
|
Reference in New Issue
Block a user