Open JonellaCulmer opened 1 year ago
FTR, we're adding the - FEC.gov
suffix in two-ish places (two lines of two templates) and | FEC*
in 10 places
https://developers.google.com/search/docs/appearance/title-link
How title links in Google Search are created Google's generation of title links on the Google Search results page is completely automated and takes into account both the content of a page and references to it that appear on the web. The goal of the title link is to best represent and describe each result.
Google Search uses the following sources to automatically determine title links:
- Content in
<title>
elements- Main visual title shown on the page
- Heading elements, such as
<h1>
elements- Other content that's large and prominent through the use of style treatments
- Other text contained in the page
- Anchor text on the page
- Text within links that point to the page
- WebSite structured data
The "FEC | ..."
prefix comes from the title_tag
field in Wagtail editing template's promote tab ( it's called seo_title
in the database).
" | FEC"
is added. (data and legal base templates do not have this conditonal statemtent)
get_content_secrtion(self)
in models.py do not show value from the title_tag(seo_title) in search-result listings. Instead, they get a suffix of "- FEC.gov" from meta tags in partials/mets-tags.html
The below draft pull request has a filter added to the search.html template to remove both pattens (FEC |
and - FEC.gov
) from the titles of site-search results.
feature/5945-rm-prefix-suffix-from-insite-search-results
What we're after: Following the site map work, we are now displaying
- FEC.gov
at the end of many wagtail pages. We would like to remove this as it adds no value while on the FEC website and potentially creates confusion regarding the storage of our content.Slack discussion: https://fecgov.slack.com/archives/C3X3K6EVA/p1695909045823319
Completion criteria
Research considerations
FEC |
prefix and- FEC.gov
suffix are coming from