MishkaBlog.ShareCards (Mishka Blog v0.0.1)

Copy Markdown View Source

Which share card (MishkaCmsCore.Runtime.ShareCard) a blog record shows: the kind of record its page shows (MishkaBlog.Plugins.PageRecords) and the captures that name it — what a page of that kind answers for (MishkaBlog.Plugins.PageSeo).

The after-save plugins (MishkaBlog.Plugins.PostShareCard and its siblings) hand it to ShareCard.refresh/3, and each record's edit modal to its Share image field (ui do extra %{share_card: &MishkaBlog.ShareCards.target/1} end). A record a visitor cannot open — a post not published, a category or a team not active — shows none: nil.

targets/1 names every card of a site, for MishkaBlog.Plugins.ShareCardTargets.

Summary

Functions

Every share card the blog shows on the site site_id, as target/1 names it: each published post, active category and tag in its own language, and each blogger and active team once in each language the site publishes in (MishkaCmsCore.Runtime.Languages.site/1), the language in its captures. Only a record in one of those languages is named.

Functions

target(arg1)

@spec target(struct()) :: MishkaCmsCore.Runtime.ShareCard.target() | nil

targets(site_id)

@spec targets(String.t() | nil) :: Enumerable.t()

Every share card the blog shows on the site site_id, as target/1 names it: each published post, active category and tag in its own language, and each blogger and active team once in each language the site publishes in (MishkaCmsCore.Runtime.Languages.site/1), the language in its captures. Only a record in one of those languages is named.

A stream: the rows are read through :public_list as a visitor reads them, a hundred at a time (MishkaCmsCore.Runtime.Compilers.SitemapCompiler.stream_rows/2), so a record a visitor may not open names none. [] for no site.