Skip to content

Commit 1acb26d

Browse files
Fix link to crawler file
The `generate_file_links` method generates a `panel/links.html` file for search engines to crawl. When `panel/index.html` was converted to `_panel.rhtml` in 4c5d4a0, the link to `panel/links.html` was broken. Though the value of this file may be debatable, it definitely provides zero value if it is unreachable. This commit fixes the broken link. This commit also renames the `generate_search_index` method to `generate_file_links`, and renames `search_index.rhtml` to `file_links.rhtml` so that it won't be confused with `search_index.js`, which is entirely unrelated.
1 parent f32277f commit 1acb26d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

lib/rdoc/generator/template/rails/_panel.rhtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@
3131
</div>
3232
</div>
3333

34-
<a id="links" href="links.html">index</a>
34+
<a id="links" href="/panel/file_links.html">index</a>
3535
</div>
3636
</nav>
File renamed without changes.

lib/sdoc/generator.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def generate
102102
copy_resources
103103
@json_index.generate
104104
@json_index.generate_gzipped
105-
generate_search_index
105+
generate_file_links
106106
generate_class_tree
107107

108108
generate_index_file
@@ -177,10 +177,10 @@ def generate_file_files
177177
end
178178

179179
### Generate file with links for the search engine
180-
def generate_search_index
180+
def generate_file_links
181181
debug_msg "Generating search engine index in #{@outputdir}"
182-
templatefile = @template_dir + 'search_index.rhtml'
183-
outfile = @outputdir + 'panel/links.html'
182+
templatefile = @template_dir + 'file_links.rhtml'
183+
outfile = @outputdir + 'panel/file_links.html'
184184

185185
self.render_template( templatefile, binding(), outfile ) unless @options.dry_run
186186
end

0 commit comments

Comments
 (0)