Original link: https://yousazoe.top/archives/dfde53a2.html
introduction
The image bed solution of Github + Jsdelivr has not been stable recently. In order to improve the loading speed of the website, this site will start to use Youpaiyun as a blog image bed.
Create cloud storage
Register and take a cloud account, and select云存储
in the console.
云存储
settings are shown below:
Bind domain name
After the service is created, you can actually access the content in the cloud storage through the test domain name:
OK, let’s follow the normal process. Bind the domain name. After entering the domain name that needs to be bound, the filing information will be verified. After the verification is passed, the binding is successful. At this time, click the CNAME
button, and the domain name resolution configuration will appear.
DNS
After copying the obtained domain name resolution configuration, go to the resolution page of your domain name. Here I use the domain name and resolution of Tencent Cloud. The settings are as follows:
After completion, you can replace the test domain name with your own domain name to access resources, but it will take about ten minutes for the domain name resolution to take effect.
Shoot the cloud alliance again
You can get a certain amount of storage space and traffic by joining the Youpaiyun Alliance . It is quite simple to apply. The more troublesome point is how to put the Logo under the site. Taking the Hexo + NexT I use as an example, open themes/next-reloaded/layout/_partials/footer.swig
modify it:
< span > |
uPic image bed configuration
空间名称
: The name of the object storage space, which can be viewed in the Youpai Cloud console. legend操作员
: The authorized operator of the current space. legend操作员密码
: The corresponding operator password. legend域名
: Use the default test domain name provided by Youpaiyun or your custom domain name. The test domain name can be viewed on the console. The domain name must start with http:// or https://. legend保存路径
: The path (including the folder) where the file is stored. Variables such as {year} {month} {day} {hour} {minute} {second} {since_second} {since_millisecond} {random} {filename} {.suffix} are supported. For example, if the uploaded image is uPic.jpg, if it is set to “uPic/{filename}{.suffix}”, it will be saved to “uPic/uPic.jpg”.- After the
保存路径
input box is the URL suffix: used for custom image processing. You can configure the image processing-custom version in the cloud object storage. For example, if the rule name is w to identify the watermark version, and the separator is !, you can fill in !w in the URL suffix. After each uploaded image generation connection, -w will be appended to it, which means access to the watermark version.
Reference article
This article is reprinted from: https://yousazoe.top/archives/dfde53a2.html
This site is for inclusion only, and the copyright belongs to the original author.