SOLVED: How to implement cgi-bin to hugo?

Hello friends,

I asked google a lot, but found no solution.
I need hugo to execute shell scripts. HTML uses cgi-bin.
Can I just use a static html file to do this?

Thanks!

cgi-bin is run by the server
hugo generate the html

What’s the problem you’re trying to solve?

I’m guessing your site will have a mixture of static and dynamic pages, and the dynamic pages will be built through these shell scripts? If this is the case, is a static site generator really the right tool (it may be, just should ask the question)?

Depending on how your server is configured, it may be possible to have the dynamic pages stored in /static. All files stored there will simply be copied to /public…and as long as your HTTP server is configured the way you want, they could (possibly) be run from there.

To save energy, I am moving tasks from my Linux PC to the datastore. The latter is a headless mini-pc running 24x7, the Linux PC a big PC. So that I don’t need the Linux PC so often or long anymore. The datastore can play webradio, too, for example.

If so, I need to control tasks on the headless PC without my Linux PC. Always on is my smartphone and sometimes my small tablet. I can ssh from the mobile devices, but the small on screen keyboard is pesky to use. I need a GUI with buttons I can press with my thumb on those devices.

I don’t know how to create a HTML page that adjusts its output on all devices and thought for a while that I need PWA (Progressive Web App) to do so. Creating PWAs for my need is oversized I found out. While introducing myself to the PWA world, I learned, progressive web sites seem to be sufficient.

While looking at PWAs, I noticed hugo webpages can or could be converted to PWA easily. The conversion is regarding the requirements of PWA regulations. The website is not modified but enhanced. The progressive aspect exists anyway. So I learned, I just need progressive web sites.

I am running my homepage with hugo and now I need a local webpage that is progressive to be able to be shown on desktops and mobile devices.

The only problem was, google didn’t know a lot about “hugo CGI-BIN”. I took a deeper look at the hugo documentation and found nothing about CGI-BIN. That confused me. That’s why I am asking how to do that.

Hugo build static web sites. CGI-BIN is an old system to run scripts on a web server. They have nothing to do with each other.

But you talk about having a “progressive web sites” that have even less do do with CGI-BIN.

@frjo : You are right. But it is easier for me to create a CGI-BIN webpage than learning how to create an android app.

Than you need to find another forum where people can help you with CGI-BIN scripts. This forum is for Hugo related stuff only.

I don’t agree. I do know how to enable cgi-bin at an webserver. I just didn’t know where to put my html code when using hugo. funkydan2 validated my assumption, that /static is the place I was looking for.