Skip to content

Commit

Permalink
ZFIN-9404: Add directives to tell crawlers not to crawl URLs with tem…
Browse files Browse the repository at this point in the history
…porary IDs for phenotype statements. (ZFIN#1190)
  • Loading branch information
rtaylorzfin authored Oct 25, 2024
1 parent abed714 commit 4427827
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion home/WEB-INF/jsp/ontology/phenotype-summary.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<a href="/action/phenotype/statement/${phenotype.id}">
${phenotype.displayName}
</a>
<a href="/action/phenotype/statement-popup/${phenotype.id}" class="popup-link data-popup-link"></a>
<a href="/action/phenotype/statement-popup/${phenotype.id}" class="popup-link data-popup-link" rel="nofollow"></a>
<div></div>
</c:forEach>
</td>
Expand Down
2 changes: 2 additions & 0 deletions home/javascript/react/components/PhenotypeStatement.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ const PhenotypeStatement = ({statement}) => {
key={statement.id}
href={'/action/phenotype/statement/' + statement.id}
dangerouslySetInnerHTML={{__html: statement.shortName}}
rel='nofollow'
/>
<a
className='popup-link data-popup-link'
href={`/action/phenotype/statement-popup/${statement.id}`}
rel='nofollow'
/>
</div>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {entityIDType} from '../../utils/types';
const PhenotypeStatementLink = ({entity}) => {
return (
<>
<a href={`/action/phenotype/statement/${entity.id}`} dangerouslySetInnerHTML={{__html: entity.shortName}} />
<a href={`/action/phenotype/statement-popup/${entity.id}`} className='popup-link data-popup-link'/>
<a href={`/action/phenotype/statement/${entity.id}`} dangerouslySetInnerHTML={{__html: entity.shortName}} rel='nofollow' />
<a href={`/action/phenotype/statement-popup/${entity.id}`} className='popup-link data-popup-link' rel='nofollow'/>
</>
);
};
Expand Down
4 changes: 4 additions & 0 deletions home/robots.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ Disallow: /action/quicksearch
#bots should not do updates or submit feedback
Disallow: /cgi-bin/webdriver?MIval=aa-your_input_welcome.apg

#bots don't need to crawl temporary phenotype statement pages (IDs are temporary):
Disallow: /action/phenotype/statement/
Disallow: /action/phenotype/statement-popup/

Disallow: /downloads/archive
Disallow: /downloads/archive/*

Expand Down

0 comments on commit 4427827

Please sign in to comment.