githunCDN上传后文件名称如何设置
Closed this issue · 7 comments
Chendaqian commented
https://cdn.jsdelivr.net/gh/ChenDaqian/Imgs@main/Files/${YY}-${MM}-${DD}-${HH}-${mm}
如上链接files后面的文件名称如何获取?直接写占位符上传后发现没有替换占位符
Chendaqian commented
使用 diy 属性设置吗?
imlinhanchao commented
设置在markdown-image.base.fileNameFormat
Chendaqian commented
好像已经可以了
"markdown-image.base.fileNameFormat": "${YY}-${MM}-${DD}-${HH}-${mm}",
"markdown-image.github.cdn": "https://cdn.jsdelivr.net/gh/ChenDaqian/Imgs@main/${filepath}",
是这样设置的
imlinhanchao commented
是的,没错。
Chendaqian commented
看文档描述有点歧义,我以为cdn 的${} 都是占位符需要自己替换,没想到filepath会自动替换为 base.fileNameFormat
imlinhanchao commented
markdown-image.github.cdn
标准应该设置成https://cdn.jsdelivr.net/gh/${username}/${repository}@${branch}/${filepath}
${filepath}
下个版本我再备注一下吧。
Chendaqian commented
感谢