mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-06-07 16:17:50 +00:00
Add intro for img_path
This commit is contained in:
parent
1fe0b2958b
commit
ef2aa525d5
@ -206,6 +206,31 @@ The parsing result will automatically add the CDN prefix `https://cdn.com` befor
|
||||
```
|
||||
{: .nolineno}
|
||||
|
||||
### Image path
|
||||
|
||||
When a post contains many images, it will be a time-consuming task to repeatedly define the path of the images. To solve this, we can define this path in the YAML block of the post:
|
||||
|
||||
```yml
|
||||
---
|
||||
img_path: /img/path/
|
||||
---
|
||||
```
|
||||
{: .nolineno }
|
||||
|
||||
And then, the image source of Markdown can write the file name directly:
|
||||
|
||||
```md
|
||||

|
||||
```
|
||||
{: .nolineno }
|
||||
|
||||
The output will be:
|
||||
|
||||
```html
|
||||
<img src="/img/path/flower.png" alt="The flower">
|
||||
```
|
||||
{: .nolineno }
|
||||
|
||||
## Pinned Posts
|
||||
|
||||
You can pin one or more posts to the top of the home page, and the fixed posts are sorted in reverse order according to their release date. Enable by:
|
||||
|
Loading…
x
Reference in New Issue
Block a user