fix: post.excerpt can be specified in post

https://github.com/hexojs/hexo/pull/3612
This commit is contained in:
curben 2019-08-09 13:55:10 +09:30
parent b48f810f12
commit a5dbc691ee
No known key found for this signature in database
GPG Key ID: 5D9DB57A25D34EE3
33 changed files with 38 additions and 38 deletions

View File

@ -1,6 +1,6 @@
--- ---
title: Firefox, Cross-Origin and AliExpress title: Firefox, Cross-Origin and AliExpress
subtitle: AliExpress login doesn't show up on Firefox when there is a strict cross-origin policy. excerpt: AliExpress login doesn't show up on Firefox when there is a strict cross-origin policy.
date: 2019-02-28 date: 2019-02-28
lastUpdated: 2019-04-29 lastUpdated: 2019-04-29
tags: tags:

View File

@ -1,6 +1,6 @@
--- ---
title: Default binaries in Alpine docker image title: Default binaries in Alpine docker image
subtitle: Here is the list of binaries shipped with the Docker image of Alpine Linux. excerpt: Here is the list of binaries shipped with the Docker image of Alpine Linux.
date: 2018-10-10 date: 2018-10-10
tags: tags:
- linux - linux

View File

@ -1,6 +1,6 @@
--- ---
title: How to disable Control+Alt+S shortcut in MATE title: How to disable Control+Alt+S shortcut in MATE
subtitle: The shortcut conflicts with Notepad++, here's how to disable it. excerpt: The shortcut conflicts with Notepad++, here's how to disable it.
date: 2018-10-24 date: 2018-10-24
tags: tags:
- linux - linux

View File

@ -1,6 +1,6 @@
--- ---
title: DNS-over-TLS/DNS-over-HTTPS does not protect your privacy title: DNS-over-TLS/DNS-over-HTTPS does not protect your privacy
subtitle: DoT/DoH does not completely eliminate ISP surveillance. excerpt: DoT/DoH does not completely eliminate ISP surveillance.
date: 2019-04-04 date: 2019-04-04
tags: tags:
- privacy - privacy

View File

@ -1,6 +1,6 @@
--- ---
title: Edit multiple questions on LimeSurvey title: Edit multiple questions on LimeSurvey
subtitle: List Questions view allows you to edit multiple questions at the same time. excerpt: List Questions view allows you to edit multiple questions at the same time.
date: 2018-10-18 date: 2018-10-18
lastUpdated: 2018-10-26 lastUpdated: 2018-10-26
tags: tags:

View File

@ -1,6 +1,6 @@
--- ---
title: Embed SVG without using img tag title: Embed SVG without using img tag
subtitle: Using img tag prevents the use of CSS to change property of SVG. There is a workaround. excerpt: Using img tag prevents the use of CSS to change property of SVG. There is a workaround.
date: 2019-06-01 date: 2019-06-01
tags: tags:
- svg - svg

View File

@ -1,6 +1,6 @@
--- ---
title: Prevent Engadget from redirect to guce title: Prevent Engadget from redirect to guce
subtitle: Block its cookies excerpt: Block its cookies
date: 2019-06-09 date: 2019-06-09
tags: tags:
- firefox - firefox

View File

@ -1,6 +1,6 @@
--- ---
title: Access Facebook/Instagram/Whatsapp/Google in China title: Access Facebook/Instagram/Whatsapp/Google in China
subtitle: Data roaming, commercial VPN provider to rolling your own VPN. excerpt: Data roaming, commercial VPN provider to rolling your own VPN.
date: 2018-12-31 date: 2018-12-31
lastUpdated: 2019-01-13 lastUpdated: 2019-01-13
tags: tags:

View File

@ -1,6 +1,6 @@
--- ---
title: Cloudflare in Firefox is not the end of the world title: Cloudflare in Firefox is not the end of the world
subtitle: It's not enabled by default and you can easily switch to other providers. excerpt: It's not enabled by default and you can easily switch to other providers.
date: 2019-05-25 date: 2019-05-25
tags: tags:
- firefox - firefox

View File

@ -1,6 +1,6 @@
--- ---
title: How to run more than one Firefox instance title: How to run more than one Firefox instance
subtitle: Using Firefox profiles, you can use more than two instances. excerpt: Using Firefox profiles, you can use more than two instances.
date: 2019-04-07 date: 2019-04-07
lastUpdated: 2019-08-09 lastUpdated: 2019-08-09
tags: tags:

View File

@ -1,6 +1,6 @@
--- ---
title: GNU vs BusyBox Unix tools title: GNU vs BusyBox Unix tools
subtitle: Alpine uses BusyBox while Ubuntu uses GNU tools, and they behave differently. excerpt: Alpine uses BusyBox while Ubuntu uses GNU tools, and they behave differently.
date: 2018-10-13 date: 2018-10-13
lastUpdated: 2018-10-31 lastUpdated: 2018-10-31
tags: tags:

View File

@ -1,6 +1,6 @@
--- ---
title: How to create a Hexo blog on GitHub Pages title: How to create a Hexo blog on GitHub Pages
subtitle: Host your Hexo blog for free on GitHub Pages. excerpt: Host your Hexo blog for free on GitHub Pages.
date: 2018-11-10 date: 2018-11-10
tags: tags:
- hexo - hexo
@ -130,7 +130,7 @@ Change the website's author and name
```yml ```yml
title: title:
subtitle: excerpt:
description: description:
author: author:
``` ```

View File

@ -1,6 +1,6 @@
--- ---
title: Hide folders of Caja side pane title: Hide folders of Caja side pane
subtitle: How to hide them. excerpt: How to hide them.
date: 2018-10-02 date: 2018-10-02
tags: tags:
- linux - linux

View File

@ -1,6 +1,6 @@
--- ---
title: How to create a Hexo blog on GitLab Pages title: How to create a Hexo blog on GitLab Pages
subtitle: Create a website/blog using Hexo on GitLab Pages for free using this detailed guide. excerpt: Create a website/blog using Hexo on GitLab Pages for free using this detailed guide.
date: 2018-09-21 date: 2018-09-21
lastUpdated: 2018-11-10 lastUpdated: 2018-11-10
tags: tags:
@ -111,7 +111,7 @@ Change the website's author and name
```yml ```yml
title: title:
subtitle: excerpt:
description: description:
author: author:
``` ```

View File

@ -1,6 +1,6 @@
--- ---
title: How to remove Windows 10 default apps title: How to remove Windows 10 default apps
subtitle: How to get rid of these bloatware. excerpt: How to get rid of these bloatware.
date: 2018-09-26 date: 2018-09-26
lastUpdated: 2019-03-01 lastUpdated: 2019-03-01
tags: tags:

View File

@ -1,6 +1,6 @@
--- ---
title: Make Hexo blog smaller title: Make Hexo blog smaller
subtitle: Static site serves html, css, javascript and images. These files can be compressed to reduce bandwidth and speed up the website. excerpt: Static site serves html, css, javascript and images. These files can be compressed to reduce bandwidth and speed up the website.
date: 2018-09-28 date: 2018-09-28
lastUpdated: 2018-10-06 lastUpdated: 2018-10-06
tags: tags:

View File

@ -1,6 +1,6 @@
--- ---
title: Make PDF files smaller title: Make PDF files smaller
subtitle: Convert to grayscale and reduce the resolution. excerpt: Convert to grayscale and reduce the resolution.
date: 2019-01-05 date: 2019-01-05
tags: tags:
- pdf - pdf

View File

@ -1,6 +1,6 @@
--- ---
title: microG, a replacement for the proprietary Google Play Services title: microG, a replacement for the proprietary Google Play Services
subtitle: The core of the Android OS is open source, but much of the core apps, libraries and APIs are proprietary. excerpt: The core of the Android OS is open source, but much of the core apps, libraries and APIs are proprietary.
date: 2019-01-12 date: 2019-01-12
lastUpdated: 2019-04-30 lastUpdated: 2019-04-30
tags: tags:

View File

@ -1,6 +1,6 @@
--- ---
title: Recommended Android apps title: Recommended Android apps
subtitle: Apps I'm currently using and recommend to everyone. excerpt: Apps I'm currently using and recommend to everyone.
date: 2019-01-07 date: 2019-01-07
lastUpdated: 2019-04-30 lastUpdated: 2019-04-30
tags: tags:

View File

@ -1,6 +1,6 @@
--- ---
title: You should switch to these replacements of TrueCrypt/KeePassX/Adblock Plus title: You should switch to these replacements of TrueCrypt/KeePassX/Adblock Plus
subtitle: Some have been discontinued while others have been commercialised. excerpt: Some have been discontinued while others have been commercialised.
date: 2019-01-15 date: 2019-01-15
tags: tags:
- linux - linux

View File

@ -1,6 +1,6 @@
--- ---
title: Running locally installed node packages title: Running locally installed node packages
subtitle: How to run binaries of locally installed node packages. excerpt: How to run binaries of locally installed node packages.
date: 2018-10-24 date: 2018-10-24
tags: tags:
- node - node

View File

@ -1,6 +1,6 @@
--- ---
title: Secure node modules with Snyk title: Secure node modules with Snyk
subtitle: The package dependency on Node can cause security issue. Here's how to use Snyk to mitigate it. excerpt: The package dependency on Node can cause security issue. Here's how to use Snyk to mitigate it.
date: 2018-10-01 date: 2018-10-01
lastUpdated: 2019-06-11 lastUpdated: 2019-06-11
tags: tags:

View File

@ -1,6 +1,6 @@
--- ---
title: Snyk failed to patch in Alpine docker title: Snyk failed to patch in Alpine docker
subtitle: Synk depends on GNU version of patch utility. excerpt: Synk depends on GNU version of patch utility.
date: 2018-10-31 date: 2018-10-31
lastUpdated: 2019-03-09 lastUpdated: 2019-03-09
tags: tags:

View File

@ -1,6 +1,6 @@
--- ---
title: Change spellcheck language in Ghostwriter title: Change spellcheck language in Ghostwriter
subtitle: It supports Hunspell dictionaries for spellcheck of other languages. excerpt: It supports Hunspell dictionaries for spellcheck of other languages.
date: 2018-10-14 date: 2018-10-14
lastUpdated: 2019-06-06 lastUpdated: 2019-06-06
tags: tags:

View File

@ -1,6 +1,6 @@
--- ---
title: Which statistical test should I use? title: Which statistical test should I use?
subtitle: Choosing a suitable statistical test depends on the design of the experiment, notably the number and the type of variables. excerpt: Choosing a suitable statistical test depends on the design of the experiment, notably the number and the type of variables.
date: 2019-02-09 date: 2019-02-09
tags: tags:
- stats - stats

View File

@ -1,6 +1,6 @@
--- ---
title: Use Unix line endings in Unix tools title: Use Unix line endings in Unix tools
subtitle: Before you use any Unix tools to process some file, make sure the file only use Unix line endings. excerpt: Before you use any Unix tools to process some file, make sure the file only use Unix line endings.
date: 2018-11-08 date: 2018-11-08
tags: tags:
- linux - linux

View File

@ -1,6 +1,6 @@
--- ---
title: How to check validity of GitLab CI config title: How to check validity of GitLab CI config
subtitle: How to verify/lint the config. excerpt: How to verify/lint the config.
date: 2018-10-25 date: 2018-10-25
tags: tags:
- gitlab - gitlab

View File

@ -1,6 +1,6 @@
--- ---
title: Dark Reader breaks image view in Firefox title: Dark Reader breaks image view in Firefox
subtitle: Use this workaround to view the whole image. excerpt: Use this workaround to view the whole image.
date: 2019-06-28 date: 2019-06-28
tags: tags:
- firefox - firefox

View File

@ -1,6 +1,6 @@
--- ---
title: Prevent word break in array question on LimeSurvey title: Prevent word break in array question on LimeSurvey
subtitle: In array type question, when you add many answer options, some words might break into next line, especially when the word is long. excerpt: In array type question, when you add many answer options, some words might break into next line, especially when the word is long.
date: 2018-10-31 date: 2018-10-31
tags: tags:
- stats - stats

View File

@ -3,7 +3,7 @@
<header class="archive-article-header"> <header class="archive-article-header">
<span class="archive-article-date"><%- partial('post/date') %></span> <span class="archive-article-date"><%- partial('post/date') %></span>
<%- partial('post/title', {class_name: 'archive-article-title'}) %> <%- partial('post/title', {class_name: 'archive-article-title'}) %>
<span><%- post.subtitle %></span> <span><%- post.excerpt %></span>
</header> </header>
</div> </div>
</article> </article>

View File

@ -8,12 +8,12 @@
<%- partial('post/title', {class_name: 'p-name entry-title article-title'}) %> <%- partial('post/title', {class_name: 'p-name entry-title article-title'}) %>
</header> </header>
<% } %> <% } %>
<% if (post.subtitle) { %> <% if (post.excerpt) { %>
<p class="p-summary"><%- post.subtitle %></p> <p class="p-summary"><%- post.excerpt %></p>
<% } %> <% } %>
<div class="e-content article-entry typo" itemprop="articleBody"> <div class="e-content article-entry typo" itemprop="articleBody">
<%- toc(page.content, {list_number: false}) %> <%- toc(page.content, {list_number: false}) %>
<%- post.content %> <%- post.more %>
</div> </div>
<footer class="article-footer"> <footer class="article-footer">
<ul class="article-meta"> <ul class="article-meta">

View File

@ -39,7 +39,7 @@ function openGraphHelper (options = {}) {
const { config, page, theme } = this const { config, page, theme } = this
const { content } = page const { content } = page
let images = page.photos || [] let images = page.photos || []
let description = page.subtitle || theme.description let description = page.excerpt || theme.description
const keywords = page.keywords || (page.tags && page.tags.length ? page.tags : undefined) || config.keywords const keywords = page.keywords || (page.tags && page.tags.length ? page.tags : undefined) || config.keywords
const title = page.title || theme.nickname const title = page.title || theme.nickname
const type = (this.is_post() ? 'article' : 'website') const type = (this.is_post() ? 'article' : 'website')

View File

@ -572,8 +572,8 @@ textarea {
transition: color 0.1s linear; transition: color 0.1s linear;
} }
/* Hide post's subtitle in article */ /* Hide post's excerpt in article */
.entry-summary { .p-summary {
display: none; display: none;
} }