ShuDudu's Home was started in 2011, but the web data is lost, so now begin again, I would like to make some friends, I hope you like ShuDudu's home.
Current position: ShuDudu > Life >

Static blog header Typecho mailing

Sunday on March 29th, 2020Life

(A) static blog header problem

In the April 6, 2019 issued a "static method to build a blog," I have mentioned, the mainstream static blog system Jekyll, Hexo, Hugo is highly compatible with each other. Jekyll, Hexo format for markdown document is 100?ompatible, Hugo, there are some places not compatible. For example, Jekyll and the Hexo: title corresponding in Hugo are: slug; Hugo need to mark the date in the time zone.

In order to ensure the problem does not occur when migrating between each static blog, I suggest that in the static blog writing, the file header format compatibility. Common file header format including title, date, categories, tags, I propose to increase the slug, so that mobility can not change the permanent link to the article when hugo, unless you give any post to use the parameters to customize the permalink permalink.

Personal recommendations header format is as follows:

title: Title date: 2019-04-25 10: 20: 00 + 0800 categories: - Category tags: - tag 1 - Label 2 - If there are more tags, according to the format is added slug: ti-mu

It can be used in the file header parameters to customize the permalink Permalink strongly recommended to use a relative path; if you do not comment, use the comments: false; if you do not use the theme of the page format, but custom, using the layout: false, then in md text document to write about the css, js and other related custom page formats and page appearance. More file header parameters can be found in the official documentation of static blog program; part of the theme templates also have custom parameters, you can see the official document template.

(B) Typecho mail sending problem

There are currently three Typecho send SMTP mail plug-in, in chronological order of release, namely: CommentToMail, LoveKKComment, Comment2Mail. When users install the plug-in, it will usually be installed first.

Some bloggers after installing the first plug-in, send mail may fail. Then install the plug-in is behind the success, so considered to be plug-in issues. This thinking no problem, I do change, it will directly think so. Then one for maintenance to the host, I found the plug back in the pot. Recently, after several tests, I think, if that happens, it is likely not pan plug.

Before using the plug-in, we want to choose the mailbox. These plug-ins rely on a library: PHPMailer. The library, the higher the mailbox security requirements. I looked in the territory of e-mail service provider, QQ mailbox known. But according to friends reflect, QQ-mail security is low and can not meet the requirements PHPMailer, the message will not be sent successfully, I have personally tested, did not succeed. Domain mail Tencent, QQ mailbox is functional in, so security is not up to the same, I have tried. NetEase mailbox security standards, but has limited transmission frequency. Overseas Outlook, Gmail can meet these requirements. I recommend Tencent Mail, Zoho Business Email (international version and I looked only difference data storage location within version, other differences caused you know) and Yandex.

Here, I briefly describe the process of testing the three plug-ins. I set up three typecho blog, I used a number of other plug-ins enabled.

I tested the host used is VPS. Operating environment: PHP 7.2, Centos 7.3. Mail service providers: Tencent E-mail. Respectively, to three blog background upload CommentToMail, LoveKKComment, Comment2Mail three plug-ins. These three plug-ins, each blog you first enable plug-ins are different. After the plug-ins are enabled, configure the relevant information. It was confirmed that the information entered is correct. When LoveKKComment configured, if you find pages stuck, crashes, follow the instructions in this article (click to see) method.

Next, three were in blog comments and reply comments of several operations at intervals of three minutes. This time found that these three are not issued blog messages we want. CommentToMail have to send a test mail function can send mail through this function, but the comments and reply comments message was not sent.

Login Tencent E-mail account has been sent - Log query - login records last 30 days, you can see "esmtp Log" records, as well as similar "(20:15 to 22:17, a total of 15 times)," so Text. This indicates that the plug-in connection Tencent E-mail is no problem.

In one of three blog are disabled three plug-ins, and then enable the two other plug-ins, three different plug-ins are enabled blog. Above operation is repeated again. RESULTS: Three blog messages were successfully sent, the recipient receives the corresponding e-mail.

Next, three blog are disabled three plug-ins to enable plug-ins that before. Repeat. RESULTS: Three blog messages sent were successful.

In order to verify the accuracy of test results, I will replace Apache Nginx, and then switch back to Apache, or replace the PHP version (both at 5.6 above), repeat testing is also being virtual hosts above. The result is true. Every time you replace the operating environment, each blog were deleted file, database reload.

In summary concluded: No matter which of the three first plug-in installed, all problems can not be sent by e-mail may be present. However, even the relatively old version of PHPMailer CommentToMail, is able to successfully send messages. If you install this plug-in versions of PHP 5.5 and below, the host, the background configuration interface will be deformed, but it does not affect the mail sent.

Of course, there are still a lot of people, on a virtual host or VPS supports SMTP, the first installation of plug-ins will be able to send mail correctly.

Another way: messages sent after two plug-in, when the phone end and found a page can not be adaptive. This is because the messages they send out do not support adaptive. The Mail page can be modified: LoveKKComment in four html file; Comment2Mail in plugin.php in. To modify, reference may mail template first plug-in (location: blog background - console - comments e-mail alert - edit a message template) to imitate.

Download three plug-ins are as follows:

CommentToMail: https: //github.com/visamz/CommentToMailLoveKKComment: https: //github.com/ylqjgm/LoveKKCommentComment2Mail: https: //gitee.com/HoeXhe/typecho-Comment2Mail

(C) Figure bed issue

In the evening of April 23, 2019, began bloggers reflect "Sina map bed" anti-hotlinking, partly bloggers met uploaded to Sina map bed can not display the picture of the problem, there are bloggers began to replace the picture. Then I remind members about a decade, if a bed Sina map, please pay attention to your blog. At that time, no one believed what I said. April 24, this phenomenon spread to almost all the bloggers who use Sina map of bed, when they Mongolia laps.

Here I have to boast that they have the foresight (strabismus laughs). In fact, this foresight is based on existing experience. When blog reconstruction, in order to prevent re-experience unexpected September 17, 2013, I decided to store pictures in third-party professional map bed. Unfortunately, the higher the more to build a line of defense, intercepting all the "rules" are not transparent, not open, unpredictable, volatile. Picture this blog cited, therefore, in the beginning of September 2017 the morning of the 2nd, all can not be displayed in one area. Because I did not use special technical means of the Internet, so I can not retrieve map images from the bed. Since there is no backup (then learned the importance of backups), so no part of the picture, part of the picture I got the picture again be filled.

Currently, the way I saved the picture is opened in the static storage warehouse storage services in upload pictures through a browser online, before access to a global CDN, its pages using the domain name service bound for a visit. Where the picture folder structure identical to the current path structure Typecho accessory program uses, you can ensure migrate back to the host backstage at any time, and a SQL command by a key replace all image links. May 1, 2019, I was in this way, help @ Ting Yi Xi blogger to build a map bed. Sina map to help her pull into the local bed pictures, and then import the drawing bed. However, for fear she will not use, I do not have the directory structure drawing her bed designed as an attachment path structure Typecho program.

In order to ensure free not to waste resources and increase the speed of loading pictures, each picture I have carried out a high compression strength, a lot of picture compression from about 2M to 200 KB or less, even tens of KB. And, in order to reduce the computing power and bandwidth consumption of public resources, give me access to a global view of the bed CDN, the CDN to store all the data, and global distribution, no longer use the static storage services pages service.

When you back up pictures, visit their warehouse, online in your browser "package to download as zip", can be downloaded to the local.

Of course, in the future, I might refer to some of the video data in the blog. Now registered Amazon S3, this part of the video I will upload this data.

I know for sure someone will recommend what oss, cos, seven cattle cloud, cloud and shoot them. These I have used. Without considering SMRZ various risks and information disclosure, I think they shoot these services among the best cloud services, because support for FTP file management mode, I can use the graphical file manager open source software Linux client FileZilla of there is no other object storage service toward me, "easy to download uploaded difficult" phenomenon for non-programmers groups. Currently, the account also in that it stood as seven cattle cloud, they shoot the cloud and other accounts can not be written off. In addition, there is a question to consider: I looked object storage service rules difficult to control, what has happened is very clear suggest that changes in service rules will result in a passive user. One of them is the test domain names: domain name currently provide testing and test domain name services in support https, not necessarily when the future appears as recovery test domain like seven cows, or as close as they shoot a cloud https test domain.

I am not against anyone, just generalities, he said: Some people, you can put all your pictures, videos, etc. on me towards the object store, you may have the ability to use the command-line tools to manage their batch, but this is not your show location Capital. No matter what way each blogger store pictures, are personal choice, there is no sense of superiority at all. Please do not show you that self-righteous superiority, this will only low brush your character limit.

Copyright Protection: ShuDudu from the original article, reproduced Please keep the link: https://www.shududu.com/life/Static-blog-header-Typecho-mailing.htm