Repository navigation
Conversation
…, discovery) Co-authored-by: Evgenii Zinner <121451298+Evgenii-Zinner@users.noreply.github.com>
|
Evgenii-Zinner
left a comment
There was a problem hiding this comment.
Thoughts on the Open Questions:
-
Emit
sameAsfor legacysite:socialby default?
Yes, by default. Sites currently emit zerosameAsoutput. Automatically emittingsameAs: truefor the six standard platforms (as the prototype does) gives upgrading sites an immediate, Knowledge Graph boost without waiting for an editor to re-save settings. -
profile_linksper locale vs. shared across translations?
Per locale, as proposed. Creators and organizations frequently have region-specific profiles (e.g. Weibo/WeChat for Chinese locales, localized Twitter/X handles for French or German). The proposed "Copy to all translations" action in the admin UI prevents redundant data entry for shared links. -
seo.schemaTypelocation?
Collection admin config. It’s an SEO mapping preference rather than a core capability toggle (unlikedraftsori18ninsupports). -
IndexNow in core vs. first-party plugin?
In core. Since Phase 3 already houses sitemap providers and canonical URL resolution in core, bundling IndexNow keeps the discovery toolset unified and avoids requiring a separate plugin install for basic real-time search engine pinging.
| IndexNow tells participating search engines about changed URLs ([IndexNow documentation](https://www.indexnow.org/documentation)). The protocol's [list of participating engines](https://www.indexnow.org/searchengines.json) includes Bing, Yandex, Naver, Seznam, Yep, Internet Archive and Amazonbot. Google is not on the list, so IndexNow has no effect on Google Search. | ||
|
|
||
| - **Key.** An administrator enables IndexNow in the SEO settings. Core then generates a key of 32 hexadecimal characters (the protocol allows 8 to 128) and stores it in `site:indexnow`, which is target-local: site transfer doesn't copy it, so a cloned site gets its own key. | ||
| - **Key file.** Core serves the key at `/indexnow-{key}.txt` as UTF-8 plain text and sends that URL as `keyLocation`. Because the file sits at the root of the host, it authorizes every URL on the host. Requests for any other key return 404. |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
| - **Invalid stored identity.** Values that fail validation on read, such as a link with an unsupported scheme written by an older client, are left out of the output and logged with the prefix `[seo]`. They stay in storage, and the admin shows them with an error so an administrator can fix them. | ||
| - **Graph builders.** A builder that throws is skipped and logged; the rest of the graph renders. A plugin contribution that fails to serialize is dropped, as `jsonld` contributions are today. | ||
| - **Sitemap providers.** A failing provider is left out of the index and logged, and its route returns 500. Other sitemaps are unaffected. | ||
| - **IndexNow.** 200 and 202 count as success. On 429 the URLs are kept and sent with the next submission. On 403 (key not valid) automatic submissions stop and the settings screen asks the administrator to check the key file. Other errors are logged and recorded in `emdash:indexnow_status`. No failure affects the save or publish that triggered it. |
There was a problem hiding this comment.
On HTTP 429, the RFC currently states "the URLs are kept and sent with the next submission". The IndexNow FAQ instructs clients to inspect the Retry-After header and wait before resubmitting. If an editor publishes another post 10 seconds later, retrying immediately would breach the backoff window. We should parse Retry-After, store a cooldown timestamp in emdash:indexnow_status, and suppress outgoing calls until the window expires.
| - **Invalid stored identity.** Values that fail validation on read, such as a link with an unsupported scheme written by an older client, are left out of the output and logged with the prefix `[seo]`. They stay in storage, and the admin shows them with an error so an administrator can fix them. | ||
| - **Graph builders.** A builder that throws is skipped and logged; the rest of the graph renders. A plugin contribution that fails to serialize is dropped, as `jsonld` contributions are today. | ||
| - **Sitemap providers.** A failing provider is left out of the index and logged, and its route returns 500. Other sitemaps are unaffected. | ||
| - **IndexNow.** 200 and 202 count as success. On 429 the URLs are kept and sent with the next submission. On 403 (key not valid) automatic submissions stop and the settings screen asks the administrator to check the key file. Other errors are logged and recorded in `emdash:indexnow_status`. No failure affects the save or publish that triggered it. |
There was a problem hiding this comment.
We should treat 422 the same as 403 here.
According to the IndexNow FAQ, HTTP 422 (Unprocessable Entity) is returned when the key file is inaccessible/missing (/{key}.txt returns 404, redirect, or WAF block) or when the submitted domain doesn't match the key.
Automatic submissions should stop on both 403 and 422, prompting the administrator to check that the key file is accessible and matches the site domain.
|
|
||
| IndexNow tells participating search engines about changed URLs ([IndexNow documentation](https://www.indexnow.org/documentation)). The protocol's [list of participating engines](https://www.indexnow.org/searchengines.json) includes Bing, Yandex, Naver, Seznam, Yep, Internet Archive and Amazonbot. Google is not on the list, so IndexNow has no effect on Google Search. | ||
|
|
||
| - **Key.** An administrator enables IndexNow in the SEO settings. Core then generates a key of 32 hexadecimal characters (the protocol allows 8 to 128) and stores it in `site:indexnow`, which is target-local: site transfer doesn't copy it, so a cloned site gets its own key. |
There was a problem hiding this comment.
We should also specify a "Regenerate key" action in the SEO settings here.
If submissions is halt due to a 403 or 422 error, the administrator needs a way to rotate the key and re-verify without having to toggle the entire IndexNow integration off and on (or manipulate database options directly).
|
|
||
| Properties per node come from Google's documentation for the matching feature: | ||
|
|
||
| - **Article:** `headline`, `datePublished`, `dateModified`, `image`, and every author listed separately with `url` or `sameAs`. The author `name` holds only the name; `jobTitle` carries the title ([Article: author markup best practices](https://developers.google.com/search/docs/appearance/structured-data/article#author-bp)). Dates are ISO 8601 with a time zone offset, computed from the site time zone. |
There was a problem hiding this comment.
In the Article node properties, should we also map entry.excerpt to description? Google uses description alongside headline for snippet generation.
| - **Search and social preview.** The SEO panel shows how the entry's title, description and URL may appear in a search result, and how its Open Graph image, title and description look when shared. The preview uses the same resolved values as the head output, including fallbacks, and states that search engines choose their own snippets. | ||
| - **Robots controls.** The SEO panel shows **Hide from search results** (`noIndex`) and **Don't follow links** (`noFollow`) as separate switches. The SEO settings expose `defaultRobots`. | ||
| - **Redirect import and export.** CSV import and export for the existing redirects, with validation per row and a report of rejected rows ([issue #2291](https://github.com/emdash-cms/emdash/issues/2291)). The 404 log gains a **Create redirect** action. | ||
| - **Content checks.** Warnings in the SEO panel and in a site-wide report, each tied to a concrete fix: missing or duplicate SEO title, missing description, missing image alt text, an article image below the 50K pixels Google recommends, a canonical that points at a redirect or a 404, `noindex` on an entry linked from a menu, entries no other entry links to, and titles or descriptions beyond a configurable length. Checks never block a save, and plugins can add checks. |
There was a problem hiding this comment.
while 50K total pixels is Google's minimum for standard Search, Google Discover specifically requires width >= 1200px when paired with max-image-preview:large. We might want the content check to flag images narrower than 1200px.
| areaServed?: string[]; | ||
| foundingDate?: string; | ||
| /** Organization only. */ | ||
| identifiers?: Array<{ propertyID: string; value: string }>; |
There was a problem hiding this comment.
We should make sure the JSON-LD graph builder emits these as PropertyValue items:
{
"@type": "PropertyValue",
"propertyID": "VAT",
"value": "..."
}
|
|
||
| Kevin Kyburz (@swissky) and Evgenii Zinner (@Evgenii-Zinner) implement the phases. Each phase is one or more implementation PRs that link this RFC. | ||
|
|
||
| Phase 1 starts from Evgenii's prototype on the [`feat/dynamic-social-links`](https://github.com/Evgenii-Zinner/emdash/tree/feat/dynamic-social-links) branch of his fork. It already synthesizes the link list from `site:social` on read, converts stored handles to profile URLs with `relMe: false`, merges legacy writes without dropping custom links, and keeps `site:social` in sync on every write, with unit and render tests. The implementation PR keeps that engine, moves the list into `site:identity.links`, adds handle-only platforms and the separate `sameAs` switch, and moves `sameAs` from `WebSite` to the publisher node. The admin editor is rebuilt for the identity screen. |
There was a problem hiding this comment.
Where should the Identity UI live in the admin navigation?
Currently we have Settings -> General, Settings -> Social, and Settings -> SEO. Does Settings -> Identity replace Settings -> Social (since identity encompasses social links), or do you envision it as a dedicated new tab /settings/identity?
…-cms#4765 Phase 1) - Centralize platform registry with patternUrlBuilder factory, handle extractors, and registerPlatform() hook. - Support handle-only platforms (wechat) that never generate public URLs. - Add SiteIdentity type and schemas supporting Organization and Person publisher types, address, policies, and identifiers. - Implement bidirectional sync between authoritative site:identity and legacy site:social.
IndexNow root key file, Retry-After, 422, key regeneration; Discover image check; iso6523Code; one SEO settings screen; user-level profile links with measured query counts; settle open questions.
|
Thanks a lot for the careful review, @Evgenii-Zinner, these are really helpful. I've pushed an update to the RFC that covers them. Key file: agreed. The protocol recommends the root location and the FAQ expects the file to be named exactly 429: agreed. Core reads 422: agreed, automatic submissions now stop on 422 as on 403. Regenerate key: added to the SEO settings. It also resumes submissions that stopped on a key error. Discover images: added as a separate check for article images narrower than 1200 px when Article Identifiers: known schemes keep their own properties ( Identity screen: the SEO settings become one screen with sections for the publisher, search appearance and discovery. The publisher section replaces Open questions: I recorded your answers on 1, 3 and 4. On 2, I went a different way after looking at how authors would maintain their links: profile links now live on the user and are shared across locales, so an author enters them once in their own profile. Guest bylines keep their own links, and job titles stay per locale. I measured the extra |
Approval statusThe current revision does not meet the approval requirements yet.
This comment updates as reviews arrive. See MAINTAINING.md and the proposal process for the rules. |
|
Got it, thanks for the updates!
|
MA2153
left a comment
There was a problem hiding this comment.
Hi Kevin. I believe this RFC is trying to do too many things at once. Can we split it?
For example:
- SEO foundation RFC (Phase 1 and 2): identity, profile links, author identity,
resolveEntryUrl, canonical rules,@graph,jsonld-node - Robots:
noFollowcolumn,defaultRobots, the editor panel switches - Sitemap providers and news sitemap: add it into #4341 or make it a follow-up
- IndexNow: a small RFC
- Phase 4: can be made into feature plans
You don't have to restate resolveEntryUrl and @id. RFCs can link to each other and amend existing ones. This would make it easier to review each piece on its own.
Robots controls, IndexNow, sitemap providers and editorial tooling move to separate proposals that link this RFC.
|
Thanks @MA2153, that's a fair point, and you're right that RFCs can link to each other instead of restating
The follow-ups link back to this RFC for the shared pieces. Does this split work for you? |
|
Yes, thanks Kevin. I'll submit another review for the narrowed RFC specifically. |
danielmlr
left a comment
There was a problem hiding this comment.
Thanks Kevin! A few ideas came up , mostly small, so they're inline below. Happy to take another look once these are in!
|
|
||
| #### Head output | ||
|
|
||
| `<link rel="me">` is emitted for every site link with `relMe` that resolves to an https URL, and on an author archive also for the links of that byline, or of its user when it has one. `PageMetadataLinkRel` gains `"me"`, so plugins can contribute such links. |
There was a problem hiding this comment.
With "me" in PageMetadataLinkRel, any sandboxed plugin could add a rel="me" link and get any Mastodon profile verified as the site's own. Maybe me could stay core-only?
| Phase 2 depends on one function that returns an entry's public URL: | ||
|
|
||
| ```ts | ||
| function resolveEntryUrl(entry: { |
There was a problem hiding this comment.
ctx.content.getPublicUrl() already resolves an entry's public URL, and my RFC in #4723 pulls it out into a shared function. Right now the two don't quite line up: getPublicUrl() returns null without a site URL or for collections that aren't routable, and it passes the publish date that patterns like /{year}/{slug} need, which isn't taken here. It'd be great if this could just be that shared function, with one set of rules for when null comes back.
|
|
||
| 1. Every content page emits `<link rel="canonical">`. Without an editor override, it points at the page itself. Google: "Do include a rel="canonical" link on the canonical page itself". | ||
| 2. The URL is absolute and has no fragment. Google asks for absolute rather than relative paths and generally doesn't support fragments in canonical URLs. Graph `@id` values keep their fragments, because they identify nodes, not pages. | ||
| 3. Query parameters are removed, so `?utm_source=…` and `?gclid=…` variants point at the clean URL. Pagination is the exception: page 2 of an archive is its own canonical and doesn't point at page 1. Templates pass the page number in the page context. |
There was a problem hiding this comment.
Since the shipped templates page through archives with ?cursor= rather than a page number, every archive page after the first would end up with its canonical pointed back at page 1. Maybe templates could name the query parameters that make a page distinct, like cursor?
| 5. An editor's override in the SEO panel resolves to an absolute URL, as today. When it points at another URL, the entry is left out of the sitemap, so the site never submits a URL whose page names a different canonical. | ||
| 6. Core emits the canonical in the HTML head only, not also as a `Link` header. Google recommends choosing one method because two can disagree. | ||
| 7. A page with `noindex` keeps its self-referencing canonical. Google advises against using `noindex` to choose a canonical. | ||
| 8. Custom Astro routes pass `canonical` to `createPublicPageContext`, as today. When they don't, core uses the request URL without query string, under the same rules. |
There was a problem hiding this comment.
When the request URL is used as is, /about and /about/ could end up with two different canonical URLs, since Astro serves both by default. Maybe the path could be normalized with the trailingSlash setting here, the way getPublicUrl() already does?
|
|
||
| #### Author data in the page context | ||
|
|
||
| `createPublicPageContext` accepts `authors?: BylineSummary[]`. Templates pass `entry.data.bylines`, which `getEmDashEntry` already hydrates. When `authors` is absent, the article node falls back to `articleMeta.author` as a name-only `Person`, which is today's output. Core never queries bylines during a page render to build the graph. |
There was a problem hiding this comment.
With authors typed as BylineSummary[], sandboxed page:metadata hooks would also see the userId and custom fields that BylineInfo leaves out. Maybe BylineInfo plus the new link fields could be used here instead?
| - **Writing legacy.** A client that writes `site:social` updates the first link of each matching platform in `site:identity` and leaves every other link and switch untouched. An empty string removes that platform's first link. | ||
| - **Rollback.** An older version ignores `site:identity`. `site:social` still holds the current six values, because every write kept it in sync. | ||
|
|
||
| Site transfer exports `site:identity`. An older version that imports it ignores the unknown setting. |
There was a problem hiding this comment.
From the code, an older version would actually reject the unknown setting name rather than ignore it (settingRecordSchema in transfer/format/kinds.ts), so the import gets blocked. The byline record is strict too, and user profile links wouldn't be carried over at all, since the users table isn't part of site transfer and a principal record only holds a name and an email. Maybe a short Transfer subsection could cover this, e.g. an optional package feature like comment_reactions, with the links on the principal record and column classes for the new byline fields in transfer/format/columns.ts?
|
|
||
| ## Performance | ||
|
|
||
| The logged-out render path keeps its query count: |
There was a problem hiding this comment.
The users join covers the author links nicely, but from the code a few other inputs for the head aren't there yet: the page context only carries the entry's collection, id and slug, and the URL pattern takes a query per request unless the object cache is configured. A logo stored as its own media reference would also add a lookup to the settings load on a cold start. Could it be spelled out how each input reaches the head, maybe by folding the URL pattern and routable into _emdash_entry_metadata the way the title field already is?
…-cms#4765 Phase 1) - Centralize platform registry with patternUrlBuilder factory, handle extractors, and registerPlatform() hook. - Support handle-only platforms (wechat) that never generate public URLs. - Add SiteIdentity type and schemas supporting Organization and Person publisher types, address, policies, and identifiers. - Implement bidirectional sync between authoritative site:identity and legacy site:social.
Design proposal
Proposal: proposals/seo-foundation.md
EmDash's SEO output is spread over several separate pieces. Social links are limited to six fixed keys. Authors have no identity in structured data. JSON-LD is one unconnected block that plugins can only replace as a whole, and canonical URLs depend on the template. This RFC proposes a shared foundation in two phases that can be shipped independently:
site:identity(OrganizationorPerson), an open list of profile links with separatesameAsandrel="me"switches, handle-only platforms such as WeChat, profile links on users and guest bylines, and job titles on bylines.site:socialkeeps working in both directions.og:urland JSON-LD; an@id-linked@graph;jsonld-nodecontributions so plugins can replace, merge or remove single nodes.Robots controls, IndexNow, sitemap providers and editorial tooling are separate proposals that link this one:
Proposal type
Related work
Discussion: #4621, #4614, #2990
Supersedes the social-links scope of #4714 (its author, @Evgenii-Zinner, co-authors this RFC, and Phase 1 starts from his prototype branch). Builds on #4341 for sitemaps. Related: #4155, #4131, #4471, #4529, #2291.
Readiness
accepted(check only when ready to merge)AI assistance