Embedded web server for c#/.net Winforms Application to serve Hugo Help Pages

A Winforms Application written in c#/.net. No Internet is available for security reasons. We have started to write the documentation in Hugo, and tried to connect to the static docs on the file system, just to find out that this is not supported and a major hassle .

We could switch to mkdocs which has an offline mode (sorry, no additional link accepted by disrourse, but google will help)

The Installation of a separate Intranet-server on the target machines is not possible, because this would require more complex installation and maintenance.

Alternatively, we are thinking of including a c#/.net embedded server which points to the content of the /public; https://genhttp.org/ is an example, but there are quite a few mostly abandoned projects around.

Can anyone comment on this approach or suggest an alternative? Strictly local, no additional installation required (e.g. no Docker)

To let Hugo and your theme create links that are usable from the file system, your theme must support this.

That’s the way we went in our organization.

… your theme must support this.

Since I do not want to put much effort into developing a theme that supports it, it would be nice to know of any standard theme that supports it.

Since the documentation is rarely used from the app, I now use GenHtttp and start a non-blocking web server on request, something like:

      var files = ResourceTree.FromDirectory(htmlDir);

      var website = StaticWebsite.From(files);

      host = Host.Create()

and stop it in onClosing();

My feeling is, that such feature is pretty rare.
I only know about the theme, I maintain myself: Relearn

Ui… thanks, looks exactly like what I want. Too bad the offline-usability is not documented with all themes.

Sorry, not related : Fonts for the style generator are much too small to be read. Any change to make the graph use more of the screen?

This is best discussed in the [theme’s issue tracker}(Issues · McShelby/hugo-theme-relearn · GitHub)

This is fixed in the latest release.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.