DEV: Fix custom homepage crawler display and override (#31841)

Fixes the custom homepage crawler output to include links to the site's
top menu.

![CleanShot 2025-03-15 at 16 27
16@2x](https://github.com/user-attachments/assets/57f25b65-a218-4811-b7d4-211e3d60e586)

This also provides a way to override that content via a plugin. Example
usage in a `plugin.rb` file:

```
register_html_builder("server:custom-homepage-crawler-view") do |c|
  "<div>override</div>"
end
```
This commit is contained in:
Penar Musaraj
2025-03-17 13:06:09 -04:00
committed by GitHub
parent 08d99dc44a
commit ecbd3cc93a
4 changed files with 62 additions and 10 deletions

View File

@ -1,7 +1,9 @@
# frozen_string_literal: true
class CustomHomepageController < ApplicationController
skip_before_action :check_xhr, only: [:index]
def index
render "default/custom"
respond_to { |format| format.html { render :index } }
end
end