Skip to content

Commit f581b43

Browse files
committed
docs: update posts for author info
1 parent 96a16c8 commit f581b43

File tree

5 files changed

+21
-18
lines changed

5 files changed

+21
-18
lines changed

_posts/2019-08-08-text-and-typography.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
---
22
title: Text and Typography
3-
author:
4-
name: Cotes Chung
5-
link: https://github.com/cotes2020
3+
author: cotes
64
date: 2019-08-08 11:33:00 +0800
75
categories: [Blogging, Demo]
86
tags: [typography]

_posts/2019-08-08-write-a-new-post.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
---
22
title: Writing a New Post
3-
author:
4-
name: Cotes Chung
5-
link: https://github.com/cotes2020
3+
author: cotes
64
date: 2019-08-08 14:10:00 +0800
75
categories: [Blogging, Tutorial]
86
tags: [writing]
@@ -50,14 +48,27 @@ tags: [bee]
5048

5149
The author information of the post usually does not need to be filled in the _Front Matter_ , they will be obtained from variables `social.name` and the first entry of `social.links` of the configuration file by default. But you can also override it as follows:
5250

51+
Add author information in `_data/authors.yml` (If your website doesn't have this file, don't hesitate to create one.)
52+
53+
```yaml
54+
<author_id>:
55+
name: <full name>
56+
twitter: <twitter_of_author>
57+
url: <homepage_of_author>
58+
```
59+
{: file="_data/authors.yml" }
60+
61+
And then set up the custom author in the post's YAML block:
62+
5363
```yaml
5464
---
55-
author:
56-
name: Full Name
57-
link: https://example.com
65+
author: <author_id>
5866
---
5967
```
6068

69+
> Another benefit of reading the author information from the file `_data/authors.yml`{: .filepath } is that the page will have the meta tag `twitter:creator`, which enriches the [Twitter Cards](https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started#card-and-content-attribution) and is good for SEO.
70+
{: .prompt-info }
71+
6172
## Table of Contents
6273

6374
By default, the **T**able **o**f **C**ontents (TOC) is displayed on the right panel of the post. If you want to turn it off globally, go to `_config.yml`{: .filepath} and set the value of variable `toc` to `false`. If you want to turn off TOC for a specific post, add the following to the post's [Front Matter](https://jekyllrb.com/docs/front-matter/):

_posts/2019-08-09-getting-started.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
---
22
title: Getting Started
3-
author:
4-
name: Cotes Chung
5-
link: https://github.com/cotes2020
3+
author: cotes
64
date: 2019-08-09 20:55:00 +0800
75
categories: [Blogging, Tutorial]
86
tags: [getting started]

_posts/2019-08-11-customize-the-favicon.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
---
22
title: Customize the Favicon
3-
author:
4-
name: Cotes Chung
5-
link: https://github.com/cotes2020
3+
author: cotes
64
date: 2019-08-11 00:34:00 +0800
75
categories: [Blogging, Tutorial]
86
tags: [favicon]

_posts/2021-01-03-enable-google-pv.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
---
22
title: Enable Google Page Views
3-
author:
4-
name: Dinesh Prasanth Moluguwan Krishnamoorthy
5-
link: https://github.com/SilleBille
3+
author: sille_bille
64
date: 2021-01-03 18:32:00 -0500
75
categories: [Blogging, Tutorial]
86
tags: [google analytics, pageviews]

0 commit comments

Comments
 (0)