diff --git a/_config.yml b/_config.yml index 83f7bbeb..69ea3a99 100755 --- a/_config.yml +++ b/_config.yml @@ -6,7 +6,6 @@ # DEMO: https://redefine.ohevan.com # <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end - # BASIC INFORMATION >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start # Docs: https://redefine-docs.ohevan.com/basic/info info: @@ -20,19 +19,17 @@ info: url: https://redefine.ohevan.com # BASIC INFORMATION <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end - # IMAGE CONFIGURATION >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start # Docs: https://redefine-docs.ohevan.com/basic/defaults defaults: # Favicon favicon: /images/redefine-favicon.svg # Site logo - logo: + logo: # Site avatar avatar: /images/redefine-avatar.svg # IMAGE CONFIGURATION <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end - # COLORS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start # Docs: https://redefine-docs.ohevan.com/basic/colors colors: @@ -44,27 +41,26 @@ colors: default_mode: light # light, dark # COLORS <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end - # SITE CUSTOMIZATION >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start # Docs: https://redefine-docs.ohevan.com/basic/global global: # Custom global fonts fonts: # Chinese fonts - chinese: + chinese: enable: false # Whether to enable custom chinese fonts - family: # Font family - url: # Font URL to CSS file + family: # Font family + url: # Font URL to CSS file # English fonts - english: + english: enable: false # Whether to enable custom english fonts - family: # Font family - url: # Font URL to CSS file + family: # Font family + url: # Font URL to CSS file # Custom title fonts (navbar, sidebar) title: enable: false # Whether to enable custom title fonts - family: # Font family - url: # Font URL to CSS file + family: # Font family + url: # Font URL to CSS file # Content max width content_max_width: 1000px # Sidebar width @@ -93,14 +89,14 @@ global: # Whether to enable open graph open_graph: enable: true - image: /images/redefine-og.webp # default og:image + image: /images/redefine-og.webp # default og:image description: Hexo Theme Redefine, Redefine Your Hexo Journey. + twitter_card: summary # summary/summary_large_image/app/player # Google Analytics google_analytics: enable: false # Whether to enable Google Analytics - id: # Google Analytics Measurement ID + id: # Google Analytics Measurement ID # SITE CUSTOMIZATION <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end - # FONTAWESOME >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start # Docs: https://redefine-docs.ohevan.com/basic/fontawesome @@ -115,7 +111,6 @@ fontawesome: # Pro v6.2.1 sharp_solid: false # FONTAWESOME <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end - # HOME BANNER >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start # Docs: https://redefine-docs.ohevan.com/home/home_banner home_banner: @@ -124,7 +119,7 @@ home_banner: # style of home banner style: fixed # static or fixed # Home banner image - image: + image: light: /images/wallhaven-wqery6-light.webp # light mode dark: /images/wallhaven-wqery6-dark.webp # dark mode # Home banner title @@ -132,7 +127,7 @@ home_banner: # Home banner subtitle subtitle: text: [] # subtitle text, array - hitokoto: # 一言配置 + hitokoto: # 一言配置 enable: false # Whether to enable hitokoto show_author: false # Whether to show author api: https://v1.hitokoto.cn # API URL, can add types, see https://developer.hitokoto.cn/sentence/#%E5%8F%A5%E5%AD%90%E7%B1%BB%E5%9E%8B-%E5%8F%82%E6%95%B0 @@ -143,11 +138,11 @@ home_banner: loop: true # Whether to loop smart_backspace: true # Whether to smart backspace # Color of home banner text - text_color: + text_color: light: "#fff" # light mode dark: "#d1d1b6" # dark mode # Specific style of the text - text_style: + text_style: # Title font size title_size: 2.8rem # Subtitle font size @@ -155,11 +150,11 @@ home_banner: # Line height between title and subtitle line_height: 1.2 # Home banner custom font - custom_font: + custom_font: # Whether to enable custom font enable: false # Font family - family: + family: # URL to font CSS file url: # Home banner social links @@ -170,19 +165,18 @@ home_banner: style: default # default, reverse, center # Social links links: - github: # your GitHub URL + github: # your GitHub URL instagram: # your Instagram URL - zhihu: # your ZhiHu URL - twitter: # your twitter URL - email: # your email + zhihu: # your ZhiHu URL + twitter: # your twitter URL + email: # your email # ...... # you can add more # Social links with QRcode drawers qrs: - weixin: # your Wechat QRcode image URL + weixin: # your Wechat QRcode image URL # ...... # you can add more # HOME BANNER <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end - # NAVIGATION BAR >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start # Docs: https://redefine-docs.ohevan.com/home/navbar navbar: @@ -190,8 +184,8 @@ navbar: auto_hide: false # Navbar background color color: - left: "#f78736" #left side - right: "#367df7" #right side + left: "#f78736" #left side + right: "#367df7" #right side transparency: 35 #percent (10-99) # Navbar width (usually no need to modify) width: @@ -199,23 +193,23 @@ navbar: pages: 1000px #other pages # Navbar links links: - Home: - path: / + Home: + path: / icon: fa-regular fa-house # can be empty - # Archives: - # path: /archives + # Archives: + # path: /archives # icon: fa-regular fa-archive # can be empty - # Status: + # Status: # path: https://status.ohevan.com/ # icon: fa-regular fa-chart-bar - # About: + # About: # icon: fa-regular fa-user # submenus: # Me: /about # Github: https://github.com/EvanNotFound/hexo-theme-redefine # Blog: https://ohevan.com # Friends: /friends - # Links: + # Links: # icon: fa-regular fa-link # submenus: # Link1: /link1 @@ -230,7 +224,6 @@ navbar: preload: true # NAVIGATION BAR <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end - # HOME PAGE ARTICLE SETTINGS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start # Docs: https://redefine-docs.ohevan.com/home/home home: @@ -242,14 +235,14 @@ home: announcement: # Announcement text show_on_mobile: true # Whether to show sidebar navigation on mobile sheet menu links: - # Archives: - # path: /archives + # Archives: + # path: /archives # icon: fa-regular fa-archive # can be empty - # Tags: - # path: /tags + # Tags: + # path: /tags # icon: fa-regular fa-tags # can be empty - # Categories: - # path: /categories + # Categories: + # path: /categories # icon: fa-regular fa-folder # can be empty # ...... # you can add more # Article date format @@ -258,15 +251,14 @@ home: excerpt_length: 200 # Max length of article excerpt # Article categories visibility categories: - enable: true # Whether to enable + enable: true # Whether to enable limit: 3 # Max number of categories to display # Article tags visibility tags: - enable: true # Whether to enable - limit: 3 # Max number of tags to display + enable: true # Whether to enable + limit: 3 # Max number of tags to display # HOME PAGE ARTICLE SETTINGS <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end - # ARTICLE >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start # Docs: https://redefine-docs.ohevan.com/posts/articles articles: @@ -293,7 +285,7 @@ articles: count: true # Whether to display word count min2read: true # Whether to display reading time # Author label - author_label: + author_label: enable: true # Whether to enable auto: false # Whether to automatically add author label, e.g. Lv1, Lv2, Lv3... list: [] @@ -339,7 +331,6 @@ articles: skip_dirs: [] # ARTICLE <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end - # COMMENT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start # Docs: https://redefine-docs.ohevan.com/posts/comment comment: @@ -384,7 +375,6 @@ comment: loading: lazy # Load the comments lazily # COMMENT <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end - # FOOTER >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start # Docs: https://redefine-docs.ohevan.com/footer footer: @@ -405,14 +395,13 @@ footer: url: # ICP record url # FOOTER <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end - # INJECT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start # Docs: https://redefine-docs.ohevan.com/inject inject: # Whether to enable inject enable: false # Inject custom head html code - head: + head: - - # Inject custom footer html code @@ -421,7 +410,6 @@ inject: - # INJECT <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end - # PLUGINS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start # Docs: https://redefine-docs.ohevan.com/plugins plugins: @@ -438,19 +426,18 @@ plugins: url: # audio url cover: # audio cover url lrc: # audio cover lrc -# - name: # audio name -# artist: # audio artist -# url: # audio url -# cover: # audio cover url -# lrc: # audio cover lrc - # .... you can add more audios here + # - name: # audio name + # artist: # audio artist + # url: # audio url + # cover: # audio cover url + # lrc: # audio cover lrc + # .... you can add more audios here # Mermaid JS. Requires hexo-filter-mermaid-diagrams (npm i hexo-filter-mermaid-diagrams). See https://mermaid.js.org/ mermaid: enable: false # enable mermaid or not version: "11.4.1" # default v11.4.1 # PLUGINS <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end - # PAGE TEMPLATES >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start # Docs: https://redefine-docs.ohevan.com/page_templates page_templates: @@ -460,7 +447,6 @@ page_templates: tags_style: blur # blur, cloud # PAGE TEMPLATES <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end - # CDN >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start # Docs: https://redefine-docs.ohevan.com/cdn cdn: @@ -471,7 +457,7 @@ cdn: # Custom CDN URL # format example: https://cdn.custom.com/hexo-theme-redefine/${version}/source/${path} # The ${path} must leads to the root of the "source" folder of the theme - custom_url: + custom_url: # CDN <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end # DEVELOPER MODE >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start diff --git a/layout/components/header/head.ejs b/layout/components/header/head.ejs index c9155d34..07a14284 100755 --- a/layout/components/header/head.ejs +++ b/layout/components/header/head.ejs @@ -41,12 +41,13 @@ let ogImage = page.og_image || theme.global.open_graph?.image; let ogDescription = page.og_description || theme.global.open_graph?.description || page.description || config.description; let author = page.author || config.author || 'Redefine Team'; + let twitterCard = page.twitter_card || theme.global.open_graph?.twitter_card || 'summary'; %> <%- open_graph({ image: ogImage, author: author, description: ogDescription, - twitter_card: 'summary', + twitter_card: twitterCard, twitter_image: ogImage, }) %> <% } %>