fix(config): remove unused theme config

- remove theme.nickname and theme.description
- config.subtitle and config.description should suffice
This commit is contained in:
MDLeom 2020-03-09 02:35:47 +00:00
parent f64241723c
commit 1a9ed39332
No known key found for this signature in database
GPG Key ID: 5D9DB57A25D34EE3
3 changed files with 9 additions and 13 deletions

View File

@ -101,9 +101,5 @@ theme_config:
# https://github.com/hexojs/hexo-generator-feed
rss: /atom.xml
# Profile
nickname: MDLeom's blog
description: Troubleshooting, tips & tricks, etc.
# Load forkawesome icons? See the links option below.
icons: false

View File

@ -38,8 +38,8 @@
<link rel="manifest" href="/site.webmanifest?v=yyQLrgrMjG">
<link rel="mask-icon" href="/safari-pinned-tab.svg?v=yyQLrgrMjG" color="#3f72af">
<link rel="shortcut icon" href="/favicon.ico?v=yyQLrgrMjG">
<meta name="apple-mobile-web-app-title" content="<%- theme.nickname %>">
<meta name="application-name" content="<%- theme.nickname %>">
<meta name="apple-mobile-web-app-title" content="<%= config.title %>">
<meta name="application-name" content="<%= config.title %>">
<meta name="msapplication-TileColor" content="#3f72af">
<meta name="msapplication-config" content="/browserconfig.xml">
<meta name="theme-color" content="#3f72af">

View File

@ -28,17 +28,17 @@ function og (name, content) {
}
function openGraphHelper () {
const { config, page, theme } = this
let description = page.excerpt || theme.description || false
const { config, page } = this
let description = page.excerpt || ''
const author = config.author
const keywords = page.tags || false
const title = page.title || theme.nickname
const keywords = page.tags || ''
const title = page.title || config.title || ''
const type = (this.is_post() ? 'article' : 'website')
const url = prettyUrls(this.url, config.pretty_urls)
const screenshot = '/screenshot/' + prettyUrls(this.path, config.pretty_urls)
const siteName = config.subtitle || theme.nickname || false
const published = page.date || false
const updated = page.lastUpdated || false
const siteName = config.title || ''
const published = page.date || ''
const updated = page.lastUpdated || ''
const language = config.language.replace('-', '_')
let result = ''