Skip to content

Commit ded4c7d

Browse files
authored
The no-index functionality works only if the pages are allowed to be crawled (#461)
Closes #460 Signed-off-by: Alexander Schwartz <[email protected]>
1 parent 167ae5f commit ded4c7d

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

pages/blog-archive.ftl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<#import "/templates/template.ftl" as tmpl>
22

3-
<@tmpl.page current="blog" title="Blog archive">
3+
<@tmpl.page current="blog" title="Blog archive" noindex=true>
44

55
<div class="container mt-5 kc-article">
66
<h1>Blog Archive</h1>

static/robots.txt

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
User-agent: *
2-
Disallow: /archive/
3-
Disallow: /blog-archive.html
4-
Disallow: /blog-archive
5-
Disallow: /downloads-archive.html
6-
Disallow: /downloads-archive
1+
User-agent: *

templates/documentation-11.ftl

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22

33
<#if archive>
44
<#assign docRoot = "${root}docs/${version.version}">
5+
<#assign docApiRoot = "${root}docs-api/${version.version}">
56
<#else>
67
<#assign docRoot = "${root}docs/latest">
8+
<#assign docApiRoot = "${root}docs-api/latest">
79
</#if>
810

911
<table class="table table-bordered table-striped">
@@ -106,7 +108,7 @@
106108
<tbody>
107109
<tr>
108110
<td>
109-
<a href="${root}docs-api/${version.version}/javadocs/index.html" target="_blank">
111+
<a href="${docApiRoot}/javadocs/index.html" target="_blank">
110112
JavaDoc
111113
</a>
112114
</td>
@@ -116,7 +118,7 @@
116118
</tr>
117119
<tr>
118120
<td>
119-
<a href="${root}docs-api/${version.version}/rest-api/index.html" target="_blank">
121+
<a href="${docApiRoot}/rest-api/index.html" target="_blank">
120122
Administration REST API
121123
</a>
122124
</td>

0 commit comments

Comments
 (0)