update at 2025-09-22 18:54:59
This commit is contained in:
70
todo.list
70
todo.list
@@ -10,6 +10,7 @@
|
||||
- 如果author不为空,公众号文章作者: 大童。
|
||||
|
||||
- , ![[name.ext]]不分优先级,看哪个在文章的最前面,取最前面这个作为封面图片
|
||||
✅
|
||||
|
||||
3. 预处理markdown文件:
|
||||
对{{<gallery dir="/img/guanzhan/1" figcaption="毕业展"/>}}{{<load-photoswipe>}}或{{<gallery dir="/img/guanzhan/1"/>}}{{<load-photoswipe>}}
|
||||
@@ -20,8 +21,9 @@
|
||||
如n=2,取出的图片为xx.jpg,yy.png,那么把{{<gallery dir="/img/guanzhan/1" figcaption="毕业展"/>}}{{<load-photoswipe>}}替换为:
|
||||
![[xx.jpg]]
|
||||
![[yy.png]]
|
||||
✅
|
||||
|
||||
2.
|
||||
3.
|
||||
对如下:
|
||||
{{<gallery>}}
|
||||
{{<figure src="/img/晋中晋北行程.jpeg" caption="晋中晋北行程" >}}
|
||||
@@ -33,48 +35,40 @@
|
||||
![[晋中晋北行程-2.jpeg]]
|
||||
![[晋中晋北行程-3.jpeg]]
|
||||
|
||||
src可能使用link:
|
||||
{{<gallery>}}
|
||||
{{<figure link="/img/2025ZK12.jpg" caption="">}}
|
||||
{{<figure link="/img/2025ZK12-2.jpg" caption="">}}
|
||||
{{</gallery>}}
|
||||
替换为
|
||||
![[2025ZK12.jpg]]
|
||||
![[2025ZK12-2.jpg]]
|
||||
✅
|
||||
|
||||
2. 需求:没有成功❌❓
|
||||
|
||||
4.
|
||||
参考以下代码,渲染[fig content/],|| content,||r content,||g content,||b content等标签:
|
||||
`\[fig([^>]*?)/\]` `<span style="font-style: italic; font-size: 14px; background-color: #f5f5f5; padding: 2px;">$1</span>`
|
||||
`\|\| (.*)` `<p style="font-family:'Microsoft YaHei',sans-serif;background-color:#E5E4E2 ;padding:10px;border-radius:20px;line-height:30px;">$1</p>`
|
||||
`\|\|r (.*)` `<p style="font-family:'Microsoft YaHei',sans-serif;color:white;background-color:#6F4E37;padding:10px;border-radius:20px;line-height:30px;">$1</p>`
|
||||
`\|\|g (.*)` `<p style="font-family:'Microsoft YaHei',sans-serif;background-color:#BCE954;padding:10px;border-radius:20px;line-height:30px;">$1</p>`
|
||||
`\|\|b (.*)` `<p style="font-family:'Microsoft YaHei',sans-serif;background-color:#B6B6B4;padding:10px;border-radius:20px;line-height:30px;">$1</p>`
|
||||
`\|\|y (.*)` `<p style="font-family:'Microsoft YaHei',sans-serif;background-color:#FFFFC2;padding:10px;border-radius:20px;line-height:30px;">$1</p>`
|
||||
|
||||
||连续多行只渲染第一行,举例:
|
||||
|| content1
|
||||
content2
|
||||
content3
|
||||
|
||||
修改代码,连续多行只渲染第一行,举例:
|
||||
<p style="font-family:'Microsoft YaHei',sans-serif;background-color:#FFFFC2;padding:20px;border-radius:20px;line-height:35px;">content1</p>
|
||||
渲染为:
|
||||
<p style="font-family:'Microsoft YaHei',sans-serif;font-size:14px; background-color:#FFFFC2;padding:10px;border-radius:20px;line-height:30px;">content1</p>
|
||||
content2
|
||||
content3
|
||||
而不是:
|
||||
<p style="font-family:'Microsoft YaHei',sans-serif;background-color:#FFFFC2;padding:20px;border-radius:20px;line-height:35px;">content1\ncontent2\ncontent3</p>
|
||||
|
||||
3.
|
||||
读取markdown属性,如:
|
||||
---
|
||||
layout: post
|
||||
title: 6月特种兵式观展
|
||||
subtitle:
|
||||
description:
|
||||
date: 2025-06-11 11:00:00
|
||||
author: 大童
|
||||
image: "/img/shufa/a.jpg"
|
||||
showtoc: true
|
||||
tags:
|
||||
- 旅行
|
||||
URL:
|
||||
categories:
|
||||
- live
|
||||
slug: guanzhan
|
||||
---
|
||||
|
||||
提取以下信息(忽略两端的“”):
|
||||
- 公众号文章title: 6月特种兵式观展
|
||||
- 公众号文章作者: 大童
|
||||
- 文章封面图片:GALLERY_PRE_PATH+"/img/shufa/a.jpg",转化为![[a.jpg]]; 如image为空,封面图片取文章中第一张图片
|
||||
|
||||
4.
|
||||
2025ZK1.md 没有正确解析,公众号标题:2025ZK1,封面图片解析也不对。
|
||||
正确的应该是:
|
||||
公众号标题:“2025篆刻记录-0426”
|
||||
封面图片:![[2025ZK1-7.jpg]]
|
||||
|
||||
注意:如果我把2025ZK1.md 内容:img改成![[2025ZK1-7.jpg]],以上解析没有问题。
|
||||
<p style="font-family:'Microsoft YaHei',sans-serif;font-size:14px; background-color:#FFFFC2;padding:10px;border-radius:20px;line-height:30px;">content1
|
||||
content2
|
||||
content3
|
||||
</p>
|
||||
✅
|
||||
|
||||
5. 文章没有图片,封面使用一张默认图片(设计一张)。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user