diff --git a/layout/_partial/post/post-copyright-info.ejs b/layout/_partial/post/post-copyright-info.ejs index 1aef2210..f82347a3 100644 --- a/layout/_partial/post/post-copyright-info.ejs +++ b/layout/_partial/post/post-copyright-info.ejs @@ -1,13 +1,11 @@ <% -let licenseLang = '' +let license_lang = '' +if (config?.language === 'zh-CN') { license_lang = '.zh-hans' } +if (config?.language === 'zh-TW') { license_lang = '.zh-hant' } +let license_url = 'https://creativecommons.org/licenses/by-nc-sa/4.0/deed' + license_lang -if (config?.language === 'zh-CN') { - licenseLang = '.zh-hans' -} - -if (config?.language === 'zh-TW') { - licenseLang = '.zh-hant' -} +const use_custom = theme?.post?.copyright_info !== true && theme?.post?.copyright_info?.custom_license && theme?.post?.copyright_info?.custom_link +if (use_custom) { license_url = theme?.post?.copyright_info?.custom_link } %>