WIP: Update default meta tags shipped with Sulu #7143
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What's in this PR?
Changes what meta tags Sulu renderes by default. As a guide I used the already defined tags used in the sulu-demo. The behavior of what gets outputted can be changed via a new array supplied to the template. For more information on that, see below.
Why?
As pointed out in #6940 the current state is that the default meta tags have to be overwritten with every new instance of Sulu. This new version extends the already existing output and adds additional meta information used by Twitter, Facebook and other social media platforms (e.g. Discord) and improves their social sharing display.
Example Usage
If a tag should be ommited completely, it can be set to false
Adding now tags could be achieved as follows
Special note about how images are handled
In its current state images are loaded with the intern size
sulu-400x400-inset
which can be changed via theimageFormat
variable, in either thedefault
,twitter
orfacebook
key. An image is only rendered if its found in theextensions.excerpt.images
array. If there is no image present, you could also define a fallback image via thefallbackImage
variable indefault
,twitter
andfacebook
.Current output
With the new default configuration the output would look as follows
ToDo
base.html.twig
template