Providers
Providers pull additional data from the CMS to populate blocks. Here, you can pull things like article titles, social share links, and logos.
Article Provider
The Article Provider (Article) populates a
DeskSection
with articles.
Use flex order or css grid to reorder the articles for RWD.
DO NOT
create a duplicate
Article
and control its visibility on viewport size. This will not work.
Example:
<template>
<HeroBlock :block="block">
<SpacingProvider>
<!-- content -->
</SpacingProvider>
<!-- content -->
<Spacing>
<!-- content -->
</Spacing>
</HeroBlock>
</template>
| slots | Description |
| Default |
|
Desk List Provider
This provider returns a list of all desks within a publication — useful for menus or navbars. Unlike
DeskSection
or
Article
, this component will return the same result every time it is used.
Example
<template>
<HeroBlock :block="block">
<DeskList v-slot="{ desks }">
<!-- content... -->
</DeskList>
</HeroBlock>
</template>
| slots | Description |
| Default |
|
PageList Provider
This provider returns a list of all static pages within a publication — useful for menus or navbars. Unlike
DeskSection
or
Article
, this component will return the same result every time it is used.
Example
<template>
<HeroBlock :block="block">
<PageList v-slot="{ pages }">
<!-- content... -->
</PageList>
</HeroBlock>
</template>
| slots | Description |
| Default |
|
Logo Provider
This provider returns a publication's logo. Use CSS to style the outer
div
.
Basic Example
<template>
<HeroBlock :block="block">
<Logo />
</HeroBlock>
</template>
Example with usage of kind
<template>
<HeroBlock :block="block">
<Logo />
<!-- add a unique value for `kind` if you have multiple logo in same block -->
<Logo kind="logo-2" />
</HeroBlock>
</template>
Example of styling the logo component using CSS in HTML
<div class="relative">
<img class="w-full h-full" src="path/to/logo" />
</div>
| Props | Type | Mandatory? | Description |
|---|---|---|---|
kind | string | ❌ | Same as kind for other stylable components, but it has a default value logo. You'll only need this if you have multiple logos in a block |
The Logo component does not have any slots.
Site Provider
This provider returns the name of your publication and its associated profile information (e.g. URLs for social media links). Unlike
DeskSection
or
Article
, this component will return the same result every time it is used.
Basic Example
interface Site { name: string facebook?: string twitter?: string }
Using site.facebook + site.name for social links and TextInput default text.
<template>
<HeroBlock :block="block">
<Site v-slot="{ site }">
<TextInput kind="site-title" component="h1" :defaultValue="site.name" />
<LinkElement v-if="site.facebook" :href="site.facebook">
<TextInput kind="social-link" defaultValue="Facebook" />
</LinkElement>
</Site>
</HeroBlock>
</template>
| slots | Description |
| Default |
|