Create top-level folder (mkdir equivalent of creating a folder / create path)

I need to store a file with a path:

If I can create that would be good enough

What is the equivalent of (if I had ssh access) $ mkdir .well-known?

There are a couple of options including creating a redirect, but the way I would probably do this is create a plug-in that holds the file. It sounds complicated but really just a few steps:

  1. Click Design → Edit Custom Themes → New Plug-in.
  2. Give it a name and leave the rest blank.
  3. Now you can edit the plug-in and add a new template with the path: static/.well-known/psqr will then add that file whenever it publishes your site. A plug-in is like a little package that can apply changes to your blog, including new static files.

1 Like

I don’t know if this is covered in the Help document but could you host several files in one plug-in? Or do you need to create a plug-in per file?

Multiple files in one plug-in works too. You can have as many files and sub-folders in the “static” path as you want. (“static” is a special folder that tells Hugo these are just plain files, not special templates that need to be processed with code.)

1 Like

Success! I appreciate you, @manton.

Excellent, glad that worked. By the way, I noticed you have an “includes” in the plug-in config… No need to have that. That’s mostly intended to include HTML, JavaScript, or CSS in all your pages, which shouldn’t be needed for the .well-known file you have.

I appreciate that you took the time to review my plug-in. (My first!) Yes, I thought I had to include the file in the plug-in in includes. When it didn’t get the result I wanted, I took a fresh look at what you said about adding a new template. Then it clicked, what you were saying, and I pasted the psqr file contents into the new template as you said. Voilà! > Design > Edit Custom Themes > PSQR [the name of my plugin] > New Template

That put me on this page, and it was obvious what to do:


And now I can explain it to other noobs who come from the same starting point as I did!

One last word. Now registered and findable (q=static).