Skip to content

Commit

Permalink
fix: post.excerpt can be specified in post
Browse files Browse the repository at this point in the history
  • Loading branch information
curben committed Aug 9, 2019
1 parent b48f810 commit a5dbc69
Show file tree
Hide file tree
Showing 33 changed files with 38 additions and 38 deletions.
2 changes: 1 addition & 1 deletion source/_posts/aliexpress-no-login-firefox.md
@@ -1,6 +1,6 @@
---
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
lastUpdated: 2019-04-29
tags:
Expand Down
2 changes: 1 addition & 1 deletion source/_posts/binaries-alpine-docker.md
@@ -1,6 +1,6 @@
---
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
tags:
- linux
Expand Down
2 changes: 1 addition & 1 deletion source/_posts/disable-control-alt-s-mate-shortcut.md
@@ -1,6 +1,6 @@
---
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
tags:
- linux
Expand Down
2 changes: 1 addition & 1 deletion source/_posts/doh-tls-privacy.md
@@ -1,6 +1,6 @@
---
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
tags:
- privacy
Expand Down
2 changes: 1 addition & 1 deletion source/_posts/edit-multiple-questions-limesurvey.md
@@ -1,6 +1,6 @@
---
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
lastUpdated: 2018-10-26
tags:
Expand Down
2 changes: 1 addition & 1 deletion source/_posts/embed-svg-img.md
@@ -1,6 +1,6 @@
---
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
tags:
- svg
Expand Down
2 changes: 1 addition & 1 deletion source/_posts/engadget-redirect-guce.md
@@ -1,6 +1,6 @@
---
title: Prevent Engadget from redirect to guce
subtitle: Block its cookies
excerpt: Block its cookies
date: 2019-06-09
tags:
- firefox
Expand Down
2 changes: 1 addition & 1 deletion source/_posts/facebook-instagram-whatsapp-china.md
@@ -1,6 +1,6 @@
---
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
lastUpdated: 2019-01-13
tags:
Expand Down
2 changes: 1 addition & 1 deletion source/_posts/firefox-doh-cloudflare.md
@@ -1,6 +1,6 @@
---
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
tags:
- firefox
Expand Down
2 changes: 1 addition & 1 deletion source/_posts/firefox-instances-profiles.md
@@ -1,6 +1,6 @@
---
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
lastUpdated: 2019-08-09
tags:
Expand Down
2 changes: 1 addition & 1 deletion source/_posts/gnu-vs-busybox-tools.md
@@ -1,6 +1,6 @@
---
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
lastUpdated: 2018-10-31
tags:
Expand Down
4 changes: 2 additions & 2 deletions source/_posts/hexo-blog-github.md
@@ -1,6 +1,6 @@
---
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
tags:
- hexo
Expand Down Expand Up @@ -130,7 +130,7 @@ Change the website's author and name

```yml
title:
subtitle:
excerpt:
description:
author:
```
Expand Down
2 changes: 1 addition & 1 deletion source/_posts/hide-folders-caja-side-pane.md
@@ -1,6 +1,6 @@
---
title: Hide folders of Caja side pane
subtitle: How to hide them.
excerpt: How to hide them.
date: 2018-10-02
tags:
- linux
Expand Down
4 changes: 2 additions & 2 deletions source/_posts/how-to-create-a-hexo-blog.md
@@ -1,6 +1,6 @@
---
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
lastUpdated: 2018-11-10
tags:
Expand Down Expand Up @@ -111,7 +111,7 @@ Change the website's author and name

```yml
title:
subtitle:
excerpt:
description:
author:
```
Expand Down
2 changes: 1 addition & 1 deletion source/_posts/how-to-remove-windows-10-default-apps.md
@@ -1,6 +1,6 @@
---
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
lastUpdated: 2019-03-01
tags:
Expand Down
2 changes: 1 addition & 1 deletion source/_posts/make-hexo-blog-smaller.md
@@ -1,6 +1,6 @@
---
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
lastUpdated: 2018-10-06
tags:
Expand Down
2 changes: 1 addition & 1 deletion source/_posts/make-pdf-files-smaller.md
@@ -1,6 +1,6 @@
---
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
tags:
- pdf
Expand Down
2 changes: 1 addition & 1 deletion source/_posts/microg-google-play-replacement.md
@@ -1,6 +1,6 @@
---
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
lastUpdated: 2019-04-30
tags:
Expand Down
2 changes: 1 addition & 1 deletion source/_posts/recommended-android-apps.md
@@ -1,6 +1,6 @@
---
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
lastUpdated: 2019-04-30
tags:
Expand Down
2 changes: 1 addition & 1 deletion source/_posts/replace-truecrypt-keepassx-adblock-plus.md
@@ -1,6 +1,6 @@
---
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
tags:
- linux
Expand Down
2 changes: 1 addition & 1 deletion source/_posts/running-locally-installed-node-packages.md
@@ -1,6 +1,6 @@
---
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
tags:
- node
Expand Down
2 changes: 1 addition & 1 deletion source/_posts/secure-node-modules-snyk.md
@@ -1,6 +1,6 @@
---
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
lastUpdated: 2019-06-11
tags:
Expand Down
2 changes: 1 addition & 1 deletion source/_posts/snyk-patch-alpine-docker.md
@@ -1,6 +1,6 @@
---
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
lastUpdated: 2019-03-09
tags:
Expand Down
2 changes: 1 addition & 1 deletion source/_posts/spellcheck-language-ghostwriter.md
@@ -1,6 +1,6 @@
---
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
lastUpdated: 2019-06-06
tags:
Expand Down
2 changes: 1 addition & 1 deletion source/_posts/statistical-test.md
@@ -1,6 +1,6 @@
---
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
tags:
- stats
Expand Down
2 changes: 1 addition & 1 deletion source/_posts/unix-tools-line-endings.md
@@ -1,6 +1,6 @@
---
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
tags:
- linux
Expand Down
2 changes: 1 addition & 1 deletion source/_posts/validity-gitlab-ci-config.md
@@ -1,6 +1,6 @@
---
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
tags:
- gitlab
Expand Down
2 changes: 1 addition & 1 deletion source/_posts/view-image-dark-reader-firefox.md
@@ -1,6 +1,6 @@
---
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
tags:
- firefox
Expand Down
2 changes: 1 addition & 1 deletion source/_posts/word-break-limesurvey.md
@@ -1,6 +1,6 @@
---
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
tags:
- stats
Expand Down
2 changes: 1 addition & 1 deletion themes/typing/layout/_partial/archive-post.ejs
Expand Up @@ -3,7 +3,7 @@
<header class="archive-article-header">
<span class="archive-article-date"><%- partial('post/date') %></span>
<%- partial('post/title', {class_name: 'archive-article-title'}) %>
<span><%- post.subtitle %></span>
<span><%- post.excerpt %></span>
</header>
</div>
</article>
6 changes: 3 additions & 3 deletions themes/typing/layout/_partial/article.ejs
Expand Up @@ -8,12 +8,12 @@
<%- partial('post/title', {class_name: 'p-name entry-title article-title'}) %>
</header>
<% } %>
<% if (post.subtitle) { %>
<p class="p-summary"><%- post.subtitle %></p>
<% if (post.excerpt) { %>
<p class="p-summary"><%- post.excerpt %></p>
<% } %>
<div class="e-content article-entry typo" itemprop="articleBody">
<%- toc(page.content, {list_number: false}) %>
<%- post.content %>
<%- post.more %>
</div>
<footer class="article-footer">
<ul class="article-meta">
Expand Down
2 changes: 1 addition & 1 deletion themes/typing/scripts/openGraph.js
Expand Up @@ -39,7 +39,7 @@ function openGraphHelper (options = {}) {
const { config, page, theme } = this
const { content } = page
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 title = page.title || theme.nickname
const type = (this.is_post() ? 'article' : 'website')
Expand Down
4 changes: 2 additions & 2 deletions themes/typing/source/css/typing.css
Expand Up @@ -572,8 +572,8 @@ textarea {
transition: color 0.1s linear;
}

/* Hide post's subtitle in article */
.entry-summary {
/* Hide post's excerpt in article */
.p-summary {
display: none;
}

Expand Down

0 comments on commit a5dbc69

Please sign in to comment.