Skip to content

Commit

Permalink
Merge pull request #318 from jonathanhefner/remove-file_links
Browse files Browse the repository at this point in the history
Remove `/panel/file_links.html`
  • Loading branch information
jonathanhefner authored Oct 5, 2023
2 parents 90086d8 + f4a96a7 commit 47fb99c
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 29 deletions.
2 changes: 0 additions & 2 deletions lib/rdoc/generator/template/rails/_panel.rhtml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,5 @@
<div class="panel__nav content">
<% yield if block_given? %>
</div>

<a id="links" href="/panel/file_links.html">index</a>
</div>
</nav>
13 changes: 0 additions & 13 deletions lib/rdoc/generator/template/rails/file_links.rhtml

This file was deleted.

4 changes: 0 additions & 4 deletions lib/rdoc/generator/template/rails/resources/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ document.addEventListener("turbo:load", () => {
}
}, { once: true });

document.addEventListener("turbo:load", function() {
$('#links').hide();
});


// Hide menu on mobile when navigating to a named anchor on the current page.
// For example, when clicking on a method in the method list.
Expand Down
10 changes: 0 additions & 10 deletions lib/sdoc/generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ def generate
FileUtils.mkdir_p(@output_dir)
copy_resources
generate_search_index
generate_file_links

generate_index_file
generate_file_files
generate_class_files
Expand Down Expand Up @@ -135,26 +133,18 @@ def render_file(template_path, output_path, context = nil)
output_path.write(result)
end

### Generate index.html
def generate_index_file
render_file("index.rhtml", "index.html", index)
end

### Generate a documentation file for each class
def generate_class_files
@classes.each { |klass| render_file("class.rhtml", klass.path, klass) }
end

### Generate a documentation file for each file
def generate_file_files
@files.each { |file| render_file("file.rhtml", file.path, file) }
end

### Generate file with links for the search engine
def generate_file_links
render_file("file_links.rhtml", "panel/file_links.html", @files)
end

def generate_search_index
debug_msg "Generating search index"
unless @options.dry_run
Expand Down

0 comments on commit 47fb99c

Please sign in to comment.