added on WebSTLs (webstls.com) at 2026-07-01 22:27:05
| 1 | <!-- ===================================================================== | |
| 2 | Storefront SEO editor. Shared form CSS lives in site.css under | |
| 3 | .seo-form-* (used by /storefront_seo.cgi + /admin_seo.cgi). | |
| 4 | ===================================================================== --> | |
| 5 | ||
| 6 | <div class="page-head"> | |
| 7 | <div> | |
| 8 | <span class="page-eyebrow"><span class="dot"></span> Store · SEO</span> | |
| 9 | <h1 class="page-title">Storefront SEO & social cards</h1> | |
| 10 | <p class="page-subtitle">Set the title, description, keywords, and Open Graph / Twitter Card images that show in Google results and when buyers share your store on social media.</p> | |
| 11 | </div> | |
| 12 | </div> | |
| 13 | ||
| 14 | [if:$has_flash] | |
| 15 | <div class="pr-flash $flash_kind">$flash_msg</div> | |
| 16 | [/if] | |
| 17 | ||
| 18 | [if:$schema_missing] | |
| 19 | <div class="an-banner" style="background:rgba(245,158,11,0.10);border-color:rgba(245,158,11,0.30)"> | |
| 20 | <strong>SEO schema not yet installed.</strong> Run the latest <code>db_schema.sql</code> against your database to bring the SEO columns on storefronts online. | |
| 21 | </div> | |
| 22 | [/if] | |
| 23 | ||
| 24 | [if:$no_storefront][if:$schema_ready] | |
| 25 | <div style="text-align:center;padding:60px 24px;background:var(--col-surface-1);border:1px solid var(--col-border);border-radius:12px"> | |
| 26 | <div class="text-sm fw-600" style="color:#fff;margin-bottom:6px">No storefront yet</div> | |
| 27 | <div class="text-xs text-dim" style="margin-bottom:14px">Launch your storefront first — SEO settings are per-storefront.</div> | |
| 28 | <a href="/storefront.cgi" class="btn btn-primary btn-sm">Launch storefront</a> | |
| 29 | </div> | |
| 30 | [/if][/if] | |
| 31 | ||
| 32 | [if:$has_storefront][if:$schema_ready] | |
| 33 | <div class="seo-grid"> | |
| 34 | <form method="POST" action="/storefront_seo.cgi" class="pr-form"> | |
| 35 | <input type="hidden" name="act" value="save"> | |
| 36 | <div class="pr-form-grid"> | |
| 37 | <div class="pr-field full"> | |
| 38 | <label>Page title</label> | |
| 39 | <input type="text" name="seo_title" maxlength="160" value="$seo_title" placeholder="$default_title"> | |
| 40 | <div class="hint">Shows in the browser tab and as the headline in Google search results. 50–60 characters is the sweet spot.</div> | |
| 41 | </div> | |
| 42 | ||
| 43 | <div class="pr-field full"> | |
| 44 | <label>Meta description</label> | |
| 45 | <textarea name="seo_description" maxlength="320" placeholder="$default_description">$seo_description</textarea> | |
| 46 | <div class="hint">The summary text shown under the title in search results. Aim for 150–160 characters and lead with a clear benefit.</div> | |
| 47 | </div> | |
| 48 | ||
| 49 | <div class="pr-field full"> | |
| 50 | <label>Keywords</label> | |
| 51 | <input type="text" name="seo_keywords" maxlength="255" value="$seo_keywords" placeholder="3d printing, miniatures, terrain, fantasy"> | |
| 52 | <div class="hint">Comma-separated. Modern search engines mostly ignore this field, but Bing and DuckDuckGo still read it for relevance hints.</div> | |
| 53 | </div> | |
| 54 | ||
| 55 | <div class="pr-field"> | |
| 56 | <label>Canonical URL</label> | |
| 57 | <input type="text" name="seo_canonical_url" maxlength="255" value="$seo_canonical_url" placeholder="https://webstls.com/store/$store_subdomain"> | |
| 58 | <div class="hint">Absolute URL. Tells search engines which version of this page is authoritative if it is accessible from multiple URLs.</div> | |
| 59 | </div> | |
| 60 | ||
| 61 | <div class="pr-field"> | |
| 62 | <label>Allow search engines to index</label> | |
| 63 | <label class="pr-radio" style="display:inline-flex"><input type="checkbox" name="seo_robots_index" value="1"[if:$is_robots_on] checked[/if]> Show this store in Google, Bing, etc.</label> | |
| 64 | <div class="hint">Untick to add <code>noindex, nofollow</code> — useful while you are still building.</div> | |
| 65 | </div> | |
| 66 | ||
| 67 | <div class="pr-field full"> | |
| 68 | <label>Social share image (Open Graph + Twitter Card)</label> | |
| 69 | <input type="text" name="seo_og_image" maxlength="255" value="$seo_og_image" placeholder="$default_image"> | |
| 70 | <div class="hint">URL of the image shown when your store link is pasted into Facebook, Discord, Slack, X/Twitter, iMessage, etc. 1200×630 pixels works everywhere.</div> | |
| 71 | </div> | |
| 72 | ||
| 73 | <div class="pr-field"> | |
| 74 | <label>Twitter / X card style</label> | |
| 75 | <select name="seo_twitter_card"> | |
| 76 | <option value="summary_large_image"[if:$is_card_large] selected[/if]>Large image (recommended)</option> | |
| 77 | <option value="summary"[if:$is_card_summary] selected[/if]>Compact summary</option> | |
| 78 | </select> | |
| 79 | </div> | |
| 80 | ||
| 81 | <div class="pr-field"> | |
| 82 | <label>Twitter / X handle</label> | |
| 83 | <input type="text" name="seo_twitter_site" maxlength="64" value="$seo_twitter_site" placeholder="@yourhandle"> | |
| 84 | <div class="hint">Optional. Adds attribution to your account when buyers share the store on X.</div> | |
| 85 | </div> | |
| 86 | </div> | |
| 87 | ||
| 88 | <div class="pr-actions"> | |
| 89 | <button type="submit" class="btn btn-primary">Save SEO settings</button> | |
| 90 | <a href="/storefront.cgi" class="btn btn-secondary">Back to storefront</a> | |
| 91 | </div> | |
| 92 | </form> | |
| 93 | ||
| 94 | <!-- Live preview of the Google SERP snippet. Updates on save. --> | |
| 95 | <aside class="seo-preview"> | |
| 96 | <div class="seo-preview-head">Search preview</div> | |
| 97 | <div class="seo-preview-card"> | |
| 98 | <div class="seo-preview-url">$preview_url</div> | |
| 99 | <div class="seo-preview-title">$preview_title</div> | |
| 100 | <div class="seo-preview-desc">$preview_desc</div> | |
| 101 | </div> | |
| 102 | <div class="seo-preview-note"> | |
| 103 | Search results truncate titles at ~60 chars and descriptions at ~160 chars. The Open Graph image is not shown in search but is what people see when they paste your link into social or chat. | |
| 104 | </div> | |
| 105 | </aside> | |
| 106 | </div> | |
| 107 | [/if][/if] | |
| 108 | ||
| 109 | <div class="adm-foot-spacer" data-end="storefront-seo"> </div> |