How to use ACME4J to get SSL certificate automatically

Why

After you have created a website, an SSL certificate has become a mandatory configuration in order to publish it to the Internet. Let’s Encrypt can issue a certificate for your website’s domain. When you want to get an SSL certificate from Let’s Encrypt, you have a number of tools to choose from. The most common tool is Certbot. If you are applying for an SSL certificate for the first time, you may have some trouble using this tool. This is because it is very powerful and there are so many options available for configuration. Especially when I want to generate a wildcard type certificate, there are so many manual steps that I may have to reapply every three months. I like automated tools. My DNS provider is alibaba cloud, so I started searching the web for an automated tool that could automatically request wildcard type letsencrypt certificates for alibaba cloud. But I was disappointed that I didn’t find the tools I wanted. Therefore, I decided to look for a relevant library and prepare to write one by myself.

Read More

How to use the github discussions to add a comment feature to your static website built with hexo?

What’s the idea?

My website was previously using Disqus for the comment system. After a while, I noticed that it automatically displayed a lot of ads. The number of ads was just too much, and the ads had little to do with my content. If I want to remove the ads, I need to pay money. So I decided to look for anothercomment system. Finally, I found Giscus, which is a system that uses the Discussions feature on Github to leave comments. Of course, there are some other systems that use Issue on Github to leave comments. But I don’t really like the idea of using Issue on Github to record comments on a website. After all, Issue is different from comments. And Github’s newly released Discussions feature was created to discuss issues, with the same purpose as website comments.

Read More

How to find the menu items in WordPress

Overview

This article introduces how to get the menu object and menu path corresponding to the current page, how to get the menu object’s sub menus, how to get the menu object’s parent object, etc. in WordPress. Even if you don’t need to define your own menu presentation, you can get inspiration from the implementation of these functions to be able to do more flexible customization in other places.

Read More