docs: update posts for author info

This commit is contained in:
Cotes Chung 2022-03-17 02:05:45 +08:00
parent 96a16c868e
commit f581b4395f
No known key found for this signature in database
GPG Key ID: 0D9E54843167A808
5 changed files with 21 additions and 18 deletions

View File

@ -1,8 +1,6 @@
---
title: Text and Typography
author:
name: Cotes Chung
link: https://github.com/cotes2020
author: cotes
date: 2019-08-08 11:33:00 +0800
categories: [Blogging, Demo]
tags: [typography]

View File

@ -1,8 +1,6 @@
---
title: Writing a New Post
author:
name: Cotes Chung
link: https://github.com/cotes2020
author: cotes
date: 2019-08-08 14:10:00 +0800
categories: [Blogging, Tutorial]
tags: [writing]
@ -50,14 +48,27 @@ tags: [bee]
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:
Add author information in `_data/authors.yml` (If your website doesn't have this file, don't hesitate to create one.)
```yaml
<author_id>:
name: <full name>
twitter: <twitter_of_author>
url: <homepage_of_author>
```
{: file="_data/authors.yml" }
And then set up the custom author in the post's YAML block:
```yaml
---
author:
name: Full Name
link: https://example.com
author: <author_id>
---
```
> 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.
{: .prompt-info }
## Table of Contents
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/):

View File

@ -1,8 +1,6 @@
---
title: Getting Started
author:
name: Cotes Chung
link: https://github.com/cotes2020
author: cotes
date: 2019-08-09 20:55:00 +0800
categories: [Blogging, Tutorial]
tags: [getting started]

View File

@ -1,8 +1,6 @@
---
title: Customize the Favicon
author:
name: Cotes Chung
link: https://github.com/cotes2020
author: cotes
date: 2019-08-11 00:34:00 +0800
categories: [Blogging, Tutorial]
tags: [favicon]

View File

@ -1,8 +1,6 @@
---
title: Enable Google Page Views
author:
name: Dinesh Prasanth Moluguwan Krishnamoorthy
link: https://github.com/SilleBille
author: sille_bille
date: 2021-01-03 18:32:00 -0500
categories: [Blogging, Tutorial]
tags: [google analytics, pageviews]