From 169f20256a1879e4a480fa5ec63a50c90a177850 Mon Sep 17 00:00:00 2001 From: younsl Date: Mon, 18 Nov 2024 01:04:24 +0900 Subject: [PATCH] feat: add toggle option for footer display - Add isShowFooter option in config.toml (default: true) - Implement conditional rendering in footer.html based on isShowFooter value --- config.toml | 1 + layouts/partials/footer.html | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/config.toml b/config.toml index 70f42a6..26d72ec 100644 --- a/config.toml +++ b/config.toml @@ -34,3 +34,4 @@ back_home_text = ".." date_format = "2006-01-02" isListGroupByDate = false + isShowFooter = true diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 319153e..37fe512 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,2 +1,4 @@ -{{ $footerContent := readFile "layouts/footer.md" }} -{{ $footerContent | markdownify }} +{{ if site.Params.theme_config.isShowFooter }} + {{ $footerContent := readFile "layouts/footer.md" }} + {{ $footerContent | markdownify }} +{{ end }} \ No newline at end of file