Skip to content

feat: CMD-187 autocreate search page#1129

Draft
wesleyboar wants to merge 47 commits intorelease/v4.36.Xfrom
feat/template-and-setting-for-google-search
Draft

feat: CMD-187 autocreate search page#1129
wesleyboar wants to merge 47 commits intorelease/v4.36.Xfrom
feat/template-and-setting-for-google-search

Conversation

@wesleyboar
Copy link
Copy Markdown
Member

Overview

Support a Google Search page with less effort.

What Effort?

Every Time:

  1. Create search engine.
  2. Configure search engine to match others.
  3. Set owners of search engine.
  4. Copy search codeID.
  5. Set relevant SEARCH settings.

Previously:

  1. Restart the server.
  2. Create /search page.
  3. Create snippet on page.
  4. Paste search code in snippet.
  5. Duplicate-or-Neglect search styles from TACC

Now, Instead:

  1. Restart the server.

Important

Incomplete because there is a suggestion (which I agree with) to use a custom migration.
Originally built off code from release/v4.36.X when it had been main branch.

Caution

Do not merge.

To Do:

Warning

Successful run requires two deploys. Help wanted.

Related

Instances:

Changes

  • added search_page app
  • added SEARCH_AUTO_SETUP setting
  • added GOOGLE_SEARCH_ENGINE_ID setting

Testing

  1. Register a Google Programmable Search Engine.
  2. Add real GOOGLE_SEARCH_ENGINE_ID setting e.g.
    GOOGLE_SEARCH_ENGINE_ID = 'b099996c09ebd4ece'
  3. Add SEARCH_AUTO_SETUP = True setting.
  4. Run/Deploy website that has no search page.
  5. Verify "Search (Auto-Generated)" page exists.
  6. Search using search bar.
  7. ✅ Verify search page shows with results.
  8. Remove GOOGLE_SEARCH_ENGINE_ID setting.
  9. Run/Deploy site.
  10. Revisit search page.
  11. ✅ Verify warning appears on page.

UI

with GOOGLE_SEARCH_ENGINE_ID sans GOOGLE_SEARCH_ENGINE_ID
search is set search not set

So that it can be loaded from CDN. Use cases are:
- if search template is broken
- for custom search page
- for non-Core website
Compared to "cms-search", "google-search" is:
- more accurate
- more obvious to those not familiar with Core-CMS
So dev sees 'google-search' from CSS before seeing it in HTML `id` attr.
This had create dbreadcrumsb before.
Final markup undecided, so keep it simple, and easy to understand.
@wesleyboar wesleyboar marked this pull request as draft March 24, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant