Which share card (MishkaCmsCore.Runtime.ShareCard) a documentation record shows: the kind of
record its page shows (MishkaDocument.Plugins.PageRecords) and the captures that name it — what
a page of that kind answers for (MishkaDocument.Plugins.PageSeo).
- a document (
MishkaDocument.Workspace), while it is active — its front page,"docs:document" - a page (
MishkaDocument.Section), while both its reviews approve it, its version is published and its document is active —"docs:page", under its document's slug, at its own part of the address: the slugs of the pages it is drawn under among its version's approved pages, then its own (MishkaDocument.Address). A version's front page shows none of its own: it is drawn at its document's address, whose card is the document's. A group shows none: it is only a heading in the contents, with no page of its own — unless it has one (group_page), which shows its own at its own address.
A page of a version other than the one a reader is shown with no ?v= is named with its "v"
(MishkaDocument.Address.version_query/2): its card shows its own version.
The after-save plugins (MishkaDocument.Plugins.WorkspaceShareCard,
MishkaDocument.Plugins.SectionShareCard) hand target/1 to ShareCard.refresh/3, and each
record's edit modal to its Share image field. A record a reader cannot open shows none: nil.
targets/1 names every card of a site, for MishkaDocument.Plugins.ShareCardTargets.
Summary
Functions
Every share card of the site site_id a visitor who is not signed in can reach, as target/1
names them: each active document's front page in its own language, once for each of its
published versions, and each approved page of each of those versions at its own address. Only
documents in a language the site lists (MishkaCmsCore.Runtime.Languages.site/1); a document
that names a permission, and a page that opens with one, are left out
(MishkaDocument.Resources.Preparations.OpenToActor).
Functions
@spec target(struct()) :: MishkaCmsCore.Runtime.ShareCard.target() | nil
@spec targets(String.t() | nil) :: Enumerable.t()
Every share card of the site site_id a visitor who is not signed in can reach, as target/1
names them: each active document's front page in its own language, once for each of its
published versions, and each approved page of each of those versions at its own address. Only
documents in a language the site lists (MishkaCmsCore.Runtime.Languages.site/1); a document
that names a permission, and a page that opens with one, are left out
(MishkaDocument.Resources.Preparations.OpenToActor).
A lazy stream of {:record, kind, captures}: the documents are read 50 at a time in
id order, their versions in one read a batch, and the ids, slugs and parents of the pages of
20 versions at a time. [] for no site.