-
Notifications
You must be signed in to change notification settings - Fork 315
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 Site Title to Dynamic Block #216
Add Site Title to Dynamic Block #216
Conversation
Since this is a dynamic block, we can modify the markup at run time (instead of saving the markup in the database to be displayed). In this case, we are appending the Site Title of the blog to the message being output. If we were to go to Settings > General and modify the "Site Title" setting, the rendered output would change (without our re-opening the post in Gutenberg). See WordPress#203
The Site Title is not modifiable within the block, but if we were to go to Settings > General and modify the "Site Title" value. When we reload the post in Gutenberg, the Site Title would be updated. See WordPress#203
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.
Just one small comment but overall this looks great to me!
We've made some pretty big structural changes to the repo so there are a lot of merge conflicts to resolve as well.
Just looks like there are some linting issues to address but after that I think we can merge this! |
I'm seeing linting issues, which I will revisit and update this PR. |
Linting issues should be resolved now. |
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.
Thanks for putting this together. It's a nice addition!
Is there anything else I can do to help get this merged now that the PR is approved? |
@salcode thanks for the follow-up! I was assuming that you could merge. At any rate, it's merged, and once again thanks for your contribution 😄 |
Ha ha, I appreciate your overestimating my powers 😀 @ryanwelcher Thanks for the merge! Have a great weekend. |
I appreciate @ryanwelcher's suggestion on simplifying PR #205
This PR adds the
Site Title
option value (found atSettings
>General
)and adds it to the "10-dynamic-block" example.
Front End
In the Editor
Note: In the editor the Site Title (in this case "gutenberg-examples") can not be modified.
Resolves #203