{% assign fm_anchorClass = layout.anchor_headings.anchorClass | default: page.anchor_headings.anchorClass | default: "" %}

{% capture anchorClass -%}
    {{- include.anchorClass -}}
    {%- if fm_anchorClass -%}
        .{{- fm_anchorClass -}}
    {%- endif -%}
{%- endcapture %}

{% assign beforeHeading = page.anchor_headings.beforeHeading | default: layout.anchor_headings.beforeHeading | default: false %}
{% assign anchorAttrs   = page.anchor_headings.anchorAttrs   | default: layout.anchor_headings.anchor