How can I add extra classes to the title of a node? I want to add more classes to the title of a node using the following code.

&lt;h3{{ title_attributes.addClass(article-full__title) }}&gt;{{ node.label }}&lt;/h3&gt;


It doesn't work, despite the fact title_attributes is described as follows.


  title_attributes: Same as attributes, except applied to the main title tag that appears in the template.


I know that is possible to add classes straightly with code similar to the following one.

&lt;h3 Class="article-full__title" }}&gt;{{ node.label }}&lt;/h3&gt;


I'm eager to know the standard way of doing this, and I don't want to miss anything.

My class names follow the BEM Name Convention rules and it's hard for me to break and behave contrary to those rules and change my class names.
You have to enclose the class in single quotes:

{{ title_attributes.addClass('article-full__title') }}


Otherwise this is interpreted as a variable name. In Twig unknown variables don't trigger an error, they return silently NULL.