Creation of home page

First, I would like to summarize how to create this homepage before writing an article related to 3DCG.

This homepage is created using Hugo.

Since I am not familiar with web-based technologies, I thought I would use a CMS such as WordPress or MovableType to create the website. However, when I looked into it, it seemed difficult to have it customized in my own way, so I decided to use Hugo, which creates static pages from what I wrote in markdown. I chose a theme called Mainroad for now.

Hugo’s official page: https://gohugo.io/

Mainroad theme page: https://themes.gohugo.io/themes/mainroad/

I think it looks a little too simple, but it has the bare minimum of functionality. (I wanted an archive page, so I added one based on one someone else had made.)

One of the reasons I wanted to write it in markdown is that I wanted to translate it into other languages through tools such as automatic translation. For now, I am only using English, but I am using the API at DeepL to translate it.

I feel that DeepL translates more naturally than Google and others, but I am a little frustrated.

  • The translation results sometimes include spaces and periods that are not necessary. As for the markdown notation, writing a space or period in the wrong position can cause it to not work correctly. For now, we are ignoring this since it has not had a major impact, but in the future we may need a tool to adjust the spaces and periods in the translation results.
  • Sometimes the same translation is written twice repeatedly. I think this is a bug in the distributed processing, but it has happened several times. At any rate, it often happens when one sentence is long, so I’m trying to work around it by splitting the sentence.

By the way, how we translate the markdown formatting is by extracting the parts we don’t want to translate and adding keep tags to control DeepL not to translate only those parts. However, there are some problems when writing Japanese that contains English words. To be more specific, if you use English words in pure text, there is no problem, but if you mix English and Japanese in the parameter settings (e.g., alt = "...")), the translation results will be wrong. This could be solved by using a markdown parser and embedding keep tags precisely, but currently that is happening because we are only using regular expressions to detect the parts where certain symbols are used, without parsing the markdown notation.

That’s how we look at the translation results and correct the Japanese writing style, but we avoid manually correcting the English translation results.

For comments, I used Disqus, which is built into Hugo. I don’t like the fact that using Disqus makes the static pages too heavy, but I also don’t like the fact that there is no way to give feedback, so I added Disqus. I think the only Japanese who give me feedback are those who point out mistakes, but I may discontinue the comments if there are no users or if people start trolling. I am not that particular about it.

Also, I zip the HTML data created by Hugo and send it to the rental server by FTP command. All such tools are written in Python, which is very convenient for writing scripts because it can easily execute anything. In addition, the server is set up to launch the specified Python script once every 10 minutes, so that when the zip file arrives, the file is extracted and published to the outside world.

If it were originally, it might be smarter to use GitHub Actions or something like that, but for now, I am manually executing the Python script. I have to look at the translation results and correct the Japanese, so it’s not fully automated yet.