-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMS Blog Posts, CMS Application Types, set up Unit Tests #123
Conversation
573d946
to
18085cd
Compare
98b137c
to
4886974
Compare
…g a Blog Post via Contentful CMS
4886974
to
930af1b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see some small changes to improve the head
elements throughout but otherwise it looks pretty solid to me!
@@ -30,7 +30,6 @@ export default function UserProfilesPage({ config, content, frontmatter }) { | |||
|
|||
fetchData(); | |||
}, [contentful]); | |||
console.log("userProfiles", userProfiles); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be removed?
pages/_app.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The og: data looks good in the head
, but pages seem to be missing a title
tag.
What about hard feeding it as:
<Head>
<title>{ogData["og:title"]}</title>
{/* Add Open Graph <meta></meta> tags here */}
{Object.keys(ogData).map((key) => (
// @ts-ignore
<meta property={key} content={ogData[key]} key={key} />
))}
</Head>
</Main> | ||
</Layout> | ||
); | ||
} | ||
|
||
export async function getStaticProps() { | ||
const { previews } = getNewsPreviews(); | ||
const subsetOfPreviews = previews.slice(0, 30); | ||
|
||
const blogPosts = await getBlogPosts(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const blogPosts = await getBlogPosts(); | |
const blogPosts = await getBlogPosts(); | |
const openGraphData = { | |
"og:title": "News and Events - Samvera", | |
"og:description": | |
"Learn about the latest News and Events in the Samvera Community.", | |
}; |
pages/news-and-events/index.jsx
Outdated
|
||
return { | ||
props: { previews }, | ||
props: { blogPosts, previews: subsetOfPreviews }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
props: { blogPosts, previews: subsetOfPreviews }, | |
props: { blogPosts, previews: subsetOfPreviews, openGraphData }, |
Since this is the coming as index.jsx page, perhaps we should hardset these openGraphData values as well? Otherwise it seems to fall back to homepage values.
Good call here @mathewjordan I'm updating OpenGraph data in other core pages as well. Thanks! |
What does this do?
@heathergreerklein So there is a LOT in this PR. Please don't merge it (I'll handle that after @mathewjordan puts some eyes on it for a sanity check). Also we should go over what content has now moved to Contentful. Maybe we can do a quick chat this week via Slack?
Essentially if you log into Contentful, you'll now see BlogPost entries, and this is where you should enter new Blog Posts (News and Event postings) from this point forward.
And now back to what this PR does:
.md
files in the new Blog Post UIHome page screen shot
New Application Types UI on homepage (replaces the slider)
Application Types New page
Update Community Banner on homepage
Updated News and Events page
Individual News and Event (Blog) page
To run tests (if you're a dev and comfortable with this), on the command line, run:
pnpm run test
And notice here that Github Actions are now running tests on PRs to
main
branch (this PR is first time):https://github.com/samvera/samvera.org/actions