Skip to content

Commit

Permalink
Added manual pages to last mod tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
spencerldixon committed Nov 29, 2024
1 parent a7f6869 commit d24126e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lib/page_modification_tracker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ def initialize(host: "localhost:3000", selector: "body")
end
end

def pages
published_pages
end

def track_page_modifications
published_pages.each_key do |path|
response = request_path(path, @app, @headers)
Expand Down Expand Up @@ -49,7 +53,13 @@ def published_pages
)
content_pages = ::Pages::Frontmatter.list.reject { |_path, fm| fm[:draft] }
event_pages = events.map { |e| Rails.application.routes.url_helpers.event_path(e.readable_id) }.index_with({})
content_pages.merge(event_pages)
manual_pages = {
"/events/about-get-into-teaching-events" => {},
"/events" => {},
"/mailinglist/signup/name" => {}
}

content_pages.merge(**event_pages, **manual_pages)
end

def request_path(path, app, headers)
Expand Down

0 comments on commit d24126e

Please sign in to comment.