Skip to content
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

Add "post" related components #177

Closed
7 of 9 tasks
fabiankaegy opened this issue Dec 7, 2022 · 0 comments · Fixed by #178
Closed
7 of 9 tasks

Add "post" related components #177

fabiankaegy opened this issue Dec 7, 2022 · 0 comments · Fixed by #178
Assignees

Comments

@fabiankaegy
Copy link
Member

fabiankaegy commented Dec 7, 2022

There are several things that come up again and again when building custom blocks. Whenever we are building integrated hero's, or card blocks we want to be able to control the post title, date, excerpt, author etc.

There are atomic core blocks for most of these components which should be used if possible. But it isn't always possible.

Components to build:

  • Post Title
  • Post Categories
  • Post Primary Category (Power by Yoast SEO)
  • Post Author
  • Post Authors (Powered by Co Authors Plus)
  • Post Excerpt
  • Post Featured Image
  • Post Tags
  • Post Meta Field

The goal here is to be able to build custom blocks like this:

export const BlockEdit = () => {
	const blockProps = useBlockProps();

	return (
		<header {...blockProps}>
			<PostCategory className="wp-block-namespace-article-header__category" />
			<PostTitle className="wp-block-namespace-article-header__title" />
			<div className="wp-block-namespace-article-header__metadata">
				<PostDate className="wp-block-namespace-article-header__date" />
				<PostAuthor className="wp-block-namespace-article-header__author" />
				<PostTimeToRead className="wp-block-namespace-article-header__time-to-read" />
			</div>
		</header>
	);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant