Menus, search and site settings
Overview
Your agent can change the settings that belong to a whole storefront rather than to one page or theme:
- Store menus: the navigation a menu element renders, such as the header and footer menus.
- Site attributes: what a site attribute element renders, such as the footer phone, email and address, the favicon, the social handles, the site title and the default SEO description and keywords.
- Search engine settings: the Canonical Links, Schema.org and Prevent Indexing switches, and a read-only view of the storefront's sitemaps and
robots.txt. - Catalog search facets: which facets the facet sidebar on a catalog page offers, the heading shoppers see for each, and the Cost facet's price points.
Every theme reads the same menus, attributes and facets, so working on an inactive theme does not isolate them. A change is live on every page as soon as it is written.
Example requests
- "Add a Sale link to the footer menu, pointing at /sale/."
- "Show me which menus the theme's templates use, and whether any of them is empty."
- "Change the footer phone number to 555-0100 and the support email to the new address."
- "Is Prevent Indexing on? If it is, tell me what that means before you change anything."
- "Turn on the Manufacturer and Free Shipping facets on the catalog sidebar, and rename the Cost facet to Price."
Commands
| Command | What it does |
|---|---|
sf menus list | List the store menus, and flag a menu a template names with nothing behind it, or a menu nothing renders |
sf menus pull, sf menus push | Read a menu into a local file with a baseline, and replace it, guarded by the version read |
sf site get | Read every site attribute, with its type, whether it can be written and whether the current theme uses it |
sf site attributes | Change site attributes with a partial update: only the names sent change |
sf site seo, sf site seo-set | Read and change Canonical Links, Schema.org and Prevent Indexing |
sf site sitemaps | Read the sitemap URLs, their child files and build times, the Sitemap: lines robots.txt serves, and the URL to register with search engines |
sf search facets get, sf search facets set | Read and change which facets are on, their headings and the Cost facet's price points |
How these changes behave
- Menus. A menu push needs
--liveevery time, because one menu serves every theme and every page that renders it. It is guarded by the version the agent read, so it cannot overwrite a newer change. A menu entry can link to a custom URL, an item, a page, a social page or a system page. An entry of type page follows its page when the page moves, which a custom URL does not. - Editing the menu element does not change the menu. The menu element renders the store menu it names. Menu content saved in a container's settings is not read when the page renders, so the agent changes the store menu with
sf menusinstead. - Site attributes. A write needs
--liveand publish permission. There is no protection against a later save elsewhere: the admin's General screen saves the whole storefront and can overwrite a change made through the CLI. Some settings cannot be written throughsf site attributes, including the header logo and the search engine switches. - Search engine settings. The switches change only through
sf site seo-set, which has a dry run that shows whether each change needs approval. The theme's templates decide what each switch outputs, so the agent checks the page in a preview after a change. - Sitemaps are rebuilt nightly. A page added, hidden from search or redirected today appears in or drops out of the files after the next build. With Prevent Indexing on, every page tells search engines not to index it, whatever the sitemap holds.
- Search facets. A change is a partial update, guarded by the version read. The agent saves the current settings first, runs a dry run, then writes with
--live;--restoreputs a saved copy back. Turning facets on or off, or changing price points, starts a search index rebuild, so a catalog page can show the old facets for a while. With no facet turned on, the sidebar renders empty and the theme hides its column. The storefront allows at most 30 facet changes an hour and 100 a day.
What it cannot do
- Change the order of search facets. The order is fixed.
- Write list, video list, mailing list or item set values, credentials, or most General screen settings as site attributes. Those are changed in the admin.
- Rehearse a menu change on an inactive theme. A menu has no draft copy. The agent can stage the container that renders it in a preview session to show the layout first.
- Fetch sitemap files.
sf site sitemapsreads where they are and when they were built; you open a file in your browser to look inside it.
What needs approval
sf site seo-set needs approval to turn Canonical Links or Schema.org off, or to turn Prevent Indexing on or off. Turning Prevent Indexing on asks for a fresh authenticator code every time. Turning Canonical Links or Schema.org on needs no approval.
The agent skill tells the agent to report Prevent Indexing and change it only when you ask: a development store usually has it on, and a store going live must have it off.
Menus, site attributes and facets need --live and publish permission, but no approval. See Changes that need approval.
Related documentation
- Menus: how store menus are set up in the admin
- Pages and themes: hiding a single page from search, and page settings
- Snapshots and reports: finding dead menu links after pages move