Replace the hardcoded node meta info with a configurable view.
The idea here is to replace the part of the node template where author/date is printed with a view block placed in layout builder.
- Create view called Node meta, listing content, unsorted.
- Create a block display, unformatted list, showing 1.
- Add a contextual filter for content ID, default to content ID from url.
- Add Authored on, Authored by, Changed fields; exclude from display.
- Remove published filter, title field.
- Configure medium date format as M j Y (or just remove time).
- Rewrite date fields to output as {{ created__value|format('medium') }}.
- Add a text field with:
- {% trans %}Posted by {{ uid }} on {{ created }}{% endtrans %}
{% if created != changed %} | {% trans %}Updated {{ changed }}{% endtrans %}{% endif %}
- {% trans %}Posted by {{ uid }} on {{ created }}{% endtrans %}
- Configure content type display, add as a block in layout builder.
With this, you can move the default layout markup from the node template into a layout, then use that layout for content, if a meta area is needed.