fix(layout): fix rss meta link & clean main.js config

This commit is contained in:
ppoffice 2020-09-03 22:48:45 -04:00
parent 9b2681f94a
commit 23553f212a
No known key found for this signature in database
GPG Key ID: B33335481CC0D498
2 changed files with 2 additions and 16 deletions

View File

@ -141,7 +141,7 @@ module.exports = class extends Component {
images={structuredImages} /> : null}
{canonical_url ? <link rel="canonical" href={canonical_url} /> : null}
{rss ? <link rel="alternative" href={url_for(rss)} title={config.title} type="application/atom+xml" /> : null}
{rss ? <link rel="alternate" href={url_for(rss)} title={config.title} type="application/atom+xml" /> : null}
{favicon ? <link rel="icon" href={url_for(favicon)} /> : null}
<link rel="stylesheet" href={iconcdn()} />
{hlTheme ? <link rel="stylesheet" href={cdn('highlight.js', '9.12.0', 'styles/' + hlTheme + '.css')} /> : null}

View File

@ -5,19 +5,9 @@ module.exports = class extends Component {
render() {
const { site, config, helper, page } = this.props;
const { url_for, cdn } = helper;
const { external_link, article } = config;
const { article } = config;
const language = page.lang || page.language || config.language || 'en';
let externalLink;
if (typeof external_link === 'boolean') {
externalLink = { enable: external_link, exclude: [] };
} else {
externalLink = {
enable: typeof external_link.enable === 'boolean' ? external_link.enable : true,
exclude: external_link.exclude || []
};
}
let fold = 'unfolded';
let clipboard = true;
if (article && article.highlight) {
@ -30,10 +20,6 @@ module.exports = class extends Component {
}
const embeddedConfig = `var IcarusThemeSettings = {
site: {
url: '${config.url}',
external_link: ${JSON.stringify(externalLink)}
},
article: {
highlight: {
clipboard: ${clipboard},