diff --git a/layouts/cohere.tsx b/layouts/cohere.tsx index b2cec725..4f4df1bb 100644 --- a/layouts/cohere.tsx +++ b/layouts/cohere.tsx @@ -7,21 +7,23 @@ import { HashtagIcon } from '@heroicons/react/solid'; -export default function Profile({ children, ...frontMatter }) { - // const { title, url, locations, people, topic, activity, image } = frontMatter; - const { title, url, locations, people, topic, activity } = frontMatter; - const image = frontMatter.logo.cached_new; +export default function CohereProfile({ children, ...frontMatter }) { + const { title, url, locations, sectors, activities } = frontMatter; + // these can look like [[../../../assets/42-acres-homepage.png]] (obsidian like) + let image = frontMatter.image; + image = image.replaceAll("[[../../../", "/").replaceAll("]]", ""); + const topic = sectors; // changed name in cohere vs pip return ( -
+

{title}

-
+
{/* details */} -
+
{url && (
@@ -47,28 +49,14 @@ export default function Profile({ children, ...frontMatter }) {
)} - {people?.length > 0 && ( -
- -
    - {people.map((value, index) => { - return ( -
  • - {value + (index === people.length - 1 ? '' : ',')} -
  • - ); - })} -
-
- )} - {activity?.length > 0 && ( + {activities?.length > 0 && (
    - {activity.map((value, index) => { + {activities.map((value, index) => { return (
  • - {value + (index === activity.length - 1 ? '' : ',')} + {value + (index === activities.length - 1 ? '' : ',')}
  • ); })} @@ -98,7 +86,8 @@ export default function Profile({ children, ...frontMatter }) {
{/* image */} -
+ {/* +
+ */}
); diff --git a/layouts/index.ts b/layouts/index.ts index 9ec29ff3..091e7868 100644 --- a/layouts/index.ts +++ b/layouts/index.ts @@ -6,6 +6,7 @@ import { } from "@portaljs/core"; import Profile from "./profile"; +import CohereProfile from "./cohere"; export default { simple: SimpleLayout, @@ -13,4 +14,5 @@ export default { unstyled: UnstyledLayout, blog: BlogLayout, profile: Profile, + cohere: CohereProfile, };