{{ if site.Params.theme_config.isShowFooter }}
    {{ $footerContent := readFile "layouts/footer.md" }}
    {{ if and $footerContent (ne $footerContent "") }}
        {{ $footerContent | markdownify }}
    {{ else }}
        {{ warnf "layouts/footer.md file is not found or empty. Falling back to default footer." }}
        <footer class="site-footer">
            <p>&copy; {{ now.Format "2006" }} {{ site.Title }}</p>
        </footer>
    {{ end }}
{{ end }}
