Skip to content

Commit

Permalink
ISSUE-21: Index all pages (not just blog pages)
Browse files Browse the repository at this point in the history
Previously we only included links that end with `.html` from the
different sitemaps. Now we include all pages.

The same conditions used to exclude some specifig pages from our index
has been left in place.
Code: `.reject {|x| x.include?("page") || x.include?("/tags/") || x.include?("author") }`

See: #21
  • Loading branch information
fbuys committed Oct 3, 2023
1 parent d8f2021 commit 3dd7a4d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ PLATFORMS
aarch64-linux
x86_64-darwin-20
x86_64-darwin-21
x86_64-darwin-22
x86_64-linux

DEPENDENCIES
Expand Down
2 changes: 1 addition & 1 deletion app/models/link.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Link < ApplicationRecord

class << self
def find_urls(sitemap)
sitemap.to_a.select {|x| x.end_with? ".html" }.reject {|x| x.include?("page") || x.include?("/tags/") || x.include?("author") }
sitemap.to_a.reject {|x| x.include?("page") || x.include?("/tags/") || x.include?("author") }
end

def find_description(page)
Expand Down

0 comments on commit 3dd7a4d

Please sign in to comment.