{%- comment -%} Inserts the (academic) title of a person. Assumes that there is a variable "person" already defined. It holds a key "title" and an associated value which is pasted here and all spaces are replaced by   If the key is not present, an informative HTML comment will be inserted. {%- endcomment -%} {%- assign person = include.person -%} {%- if person -%} {%- if person.title -%} {{ person.title | replace: " ", " " }} {%- else -%} {%- endif -%} {%- else -%} {%- endif -%}