From ff3f89f53be32b61e7767a247ea9ce20a6de5e18 Mon Sep 17 00:00:00 2001 From: Ouyang Chunhui Date: Fri, 31 Mar 2023 22:18:18 +0800 Subject: [PATCH] Support reprint (#618) --- languages/en.yml | 1 + layout/_partials/post/post-copyright.njk | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/languages/en.yml b/languages/en.yml index 9d322d7..92b65e9 100644 --- a/languages/en.yml +++ b/languages/en.yml @@ -41,6 +41,7 @@ post: post_link: This article originally appeared on license_title: Copyright Notice license_content: "All articles in this blog are licensed under %s unless stating additionally." + license_content_reprint: "This article is a reprinted article and has been reprinted with permission. Please indicate the source!" footer: powered: "Powered by %s" diff --git a/layout/_partials/post/post-copyright.njk b/layout/_partials/post/post-copyright.njk index 4efc312..f0e9c97 100644 --- a/layout/_partials/post/post-copyright.njk +++ b/layout/_partials/post/post-copyright.njk @@ -22,8 +22,13 @@ {%- endif %}
  • - {{ __('post.copyright.license_title') + __('symbol.colon') }} - {{- __('post.copyright.license_content', next_url(ccURL, ccIcon + ccText)) }} + {%- if page.copyright_reprint %} + {{ __('post.copyright.license_title') + __('symbol.colon') }} + {{- __('post.copyright.license_content_reprint', next_url(ccURL, ccIcon + ccText)) }} + {%- else %} + {{ __('post.copyright.license_title') + __('symbol.colon') }} + {{- __('post.copyright.license_content', next_url(ccURL, ccIcon + ccText)) }} + {%- endif %}