Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: 自定义链接格式希望能更灵活 #1000

Closed
3 tasks done
flespark opened this issue Oct 28, 2022 · 5 comments
Closed
3 tasks done

[Feature]: 自定义链接格式希望能更灵活 #1000

flespark opened this issue Oct 28, 2022 · 5 comments
Assignees

Comments

@flespark
Copy link

flespark commented Oct 28, 2022

前置阅读 | Pre-reading

PicGo的版本 | PicGo Version

v2.3.0

系统信息 | System Information

Windows

功能请求 | Feature request

图片上传成功后复制到剪贴板的链接格式,使用自定义链接格式只能是url和fileName组合不能满足我的需求
我的图片上传位置和个人网站是同一个github仓库,图片配置的上传到仓库的static/images路径下,每次有内容更新会触发github action编译网页,实际的CDN加速访问地址是https://mydomain.com/images/。在Markdown中使用![hover_name](/images/<fileName>)便可作为图片链接。
目前自定义链接格式中$url表示的是拼接后的完整路径,而且一定要包含$url,这里希望可以改进满足:
在配置上传路径为static/images下,
可以自定义链接格式可以是![hover_name](/images/<fileName>)的形式

@Molunerfinn
Copy link
Owner

你自定义链接格式为 ![hover_name](/images/$fileName) 不就可以了么?

@Molunerfinn
Copy link
Owner

你的需求是比较特殊的场景,不是一个普遍性的问题。后续会考虑开放链接格式的一些接口给到插件去实现更定制化的功能

@flespark
Copy link
Author

你自定义链接格式为 ![hover_name](/images/$fileName) 不就可以了么?

是的,但是自定义链接格式保存时要求必须有$url,且$fileName没有文件后缀

@Molunerfinn
Copy link
Owner

你自定义链接格式为 ![hover_name](/images/$fileName) 不就可以了么?

是的,但是自定义链接格式保存时要求必须有$url,且$fileName没有文件后缀

嗯这个可以优化一下,我加一个$ext作为后缀变量,同时不强制做$url的校验即可

@Molunerfinn
Copy link
Owner

预计跟下个beta版本带出去

@Molunerfinn Molunerfinn reopened this Oct 28, 2022
@Molunerfinn Molunerfinn added this to Done in v2.4.0 Plans Jan 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

2 participants