MCPcopy Create free account
hub / github.com/adobe/react-spectrum / Article

Function Article

packages/dev/s2-docs/src/Layout.tsx:397–427  ·  view source on GitHub ↗
({page, parentPage, children, isLongForm, isWide}: ArticleProps)

Source from the content-addressed store, hash-verified

395}
396
397function Article({page, parentPage, children, isLongForm, isWide}: ArticleProps) {
398 let section = page.exports?.section;
399 return (
400 <article
401 className={articleStyles({isLongForm, isWide})}
402 itemScope
403 itemType={`https://schema.org/${section === 'Blog' || section === 'Releases' ? 'BlogPosting' : 'TechArticle'}`}>
404 <meta itemProp="description" content={getDescription(page)} />
405 <meta itemProp="image" content={getOgImageUrl(page)} />
406 <div itemProp="publisher" itemScope itemType="https://schema.org/Organization" hidden>
407 <meta itemProp="name" content="Adobe" />
408 <meta itemProp="url" content="https://www.adobe.com" />
409 <meta itemProp="logo" content="https://www.adobe.com/favicon.ico" />
410 </div>
411 {page.exports?.version && <VersionBadge version={page.exports.version} />}
412 {page.exports?.isSubpage ? (
413 <SubpageHeader currentPage={page} parentPage={parentPage} isLongForm={isLongForm} />
414 ) : (
415 page.tableOfContents?.[0]?.level === 1 && (
416 <H1 itemProp="headline" isLongForm={isLongForm}>
417 {page.tableOfContents?.[0].title}
418 </H1>
419 )
420 )}
421 <div className={style({display: 'contents'})} itemProp="articleBody">
422 {children}
423 </div>
424 {page.exports?.relatedPages && <MobileRelatedPages pages={page.exports.relatedPages} />}
425 </article>
426 );
427}
428
429function PostListContainer({page, children, isLongForm, isWide}: ArticleProps) {
430 return (

Callers

nothing calls this directly

Calls 2

getOgImageUrlFunction · 0.85
getDescriptionFunction · 0.70

Tested by

no test coverage detected