From 640bde95c48cd3517c88f45355a502054469dff3 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Sun, 9 Jan 2022 03:01:00 +0800 Subject: [PATCH] Fix tutorial on writing posts --- _posts/2019-08-08-write-a-new-post.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/_posts/2019-08-08-write-a-new-post.md b/_posts/2019-08-08-write-a-new-post.md index c103415..df46625 100644 --- a/_posts/2019-08-08-write-a-new-post.md +++ b/_posts/2019-08-08-write-a-new-post.md @@ -217,7 +217,6 @@ The output will be: ``` {: .nolineno } - ### Preview Image If you want to add an image to the top of the post contents, specify the attribute `src`, `width`, `height`, and `alt` for the image: @@ -250,9 +249,11 @@ pin: true Markdown symbols ```` ``` ```` can easily create a code block as follows: +````md ``` This is a plaintext code snippet. ``` +```` ### Specifying Language @@ -268,18 +269,18 @@ key: value ### Line Number -By default, all languages except `plaintext`, `console`, and `terminal` will display line numbers. When you want to hide the line number of the code block, you can append `{: .nolineno}` at the next line: +By default, all languages except `plaintext`, `console`, and `terminal` will display line numbers. When you want to hide the line number of a code block, add the class `nolineno` to it: ````markdown ```shell echo 'No more line numbers!' ``` -{: .nolineno} +{: .nolineno } ```` ### Specifying the Filename -You may have noticed that the code language will be displayed on the left side of the header of the code block. If you want to replace it with the file name, you can add the attribute `file` to achieve this: +You may have noticed that the code language will be displayed at the top of the code block. If you want to replace it with the file name, you can add the attribute `file` to achieve this: ````markdown ```shell