Younsung Lee 430d4115f2
fix(partials): Footer rendering bug (#33)
* conditional rendering: render footer if `layouts/footer.md` exists and has content; fallback if empty or missing

* Resolved #33

* Caused by a0684e5add17d66d951b691c747981f1c32f91da
2024-12-12 00:28:58 +09:00

12 lines
463 B
HTML

{{ 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 }}