Files
note2any/todo.list
2025-09-22 14:58:45 +08:00

69 lines
2.6 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

1. 预处理markdown文件
对{{<gallery dir="/img/guanzhan/1" figcaption="毕业展"/>}}{{<load-photoswipe>}}或{{<gallery dir="/img/guanzhan/1"/>}}{{<load-photoswipe>}}
- 获取dir中的内容如"/img/guanzhan/1"与PREPATH拼接全局定义PRE_PATH=/Users/gavin/myweb/static
图片所在路径PREPATH+"/img/guanzhan/1",即/Users/gavin/myweb/static/img/guanzhan/1。
- 这个/Users/gavin/myweb/static/img/guanzhan/1路径下图片<5张取出所有图片; >n张任意取出n张。n=NUM_PIC作为全局定义。
- 比如n=1取出的图片为xx.jpg那么把{{<gallery dir="/img/guanzhan/1" figcaption="毕业展"/>}}{{<load-photoswipe>}}替换为![[xx.jpg]]
如n=2取出的图片为xx.jpg,yy.png那么把{{<gallery dir="/img/guanzhan/1" figcaption="毕业展"/>}}{{<load-photoswipe>}}替换为:
![[xx.jpg]]
![[yy.png]]
在main.js单独函数中处理在预处理内容时调用。
2.
对如下:
{{<gallery>}}
{{<figure src="/img/晋中晋北行程.jpeg" caption="晋中晋北行程" >}}
{{<figure src="/img/晋中晋北行程-2.png" caption="晋中晋北行程" >}}
{{<figure src="/img/晋中晋北行程-3.png" caption="晋中晋北行程" >}}
{{</gallery>}}
替换为
![[晋中晋北行程.jpeg]]
![[晋中晋北行程-2.jpeg]]
![[晋中晋北行程-3.jpeg]]
2. 需求:没有成功❌❓
|| 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;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]],以上解析没有问题。
5. 文章没有图片,封面使用一张默认图片(设计一张)。