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

Document the new "Frontity Slot Block" plugin and "slot-block" processor #42

Open
luisherranz opened this issue May 12, 2021 · 1 comment

Comments

@luisherranz
Copy link
Member

I was also wondering if it would be nice to have a Slot & Fill section in the Learning Frontity docs that explain the pattern. After all, it's one of the "core patterns". Perhaps the least known.

Also, maybe we should include some <Slot> components in mars-theme, so beginners know they exist. For example, we could add them before and after the post:

<Content>
  <!-- Add a Slot so other packages can add content here. -->
  <!-- https://docs.frontity.org/learning-frontity/slot-and-fills -->
  <Slot name="Before the post" />

  <!-- Use Html2React to process the HTML generated by WordPress -->
  <!-- https://api.frontity.org/frontity-packages/features-packages/html2react -->
  <Html2React html={post.content.rendered} />

  <!-- Add another Slot after the content. -->
  <Slot name="After the post" />
</Content>

What do you think?

@luisherranz
Copy link
Member Author

By the way, @kasperaamodt has suggested adding also a Fill block, to be able to create fills directly from Gutenberg.

I am going to investigate if it would be possible, but please take into consideration that maybe this becomes the "Frontity Slot and Fill blocks" plugin and there will be a second processor called fill-block as part of this 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant