Blog + Book/Documentation in single domain

Hi All,

I am trying to integrate documentation into my blog which is at https://kanthi.in … currently my docs/tutorials are generate with sphinx and mkdocs which I would like to migrate into Hugo. I would like for all to go into kanthi.in/docs1 & kanthi.in/docs12 with exclusive theme for docs1 & docs2 respectively. Its more like having multiple themes for single domain .

Is it even possible or what is the best way to achieve what I need. For now i tried to simply copy the generated docs into public folder of hugo and uploaded it . I am aware of few Hugo themes that support documentation …but I am looking into possibility of having separate themes for both my blog and documentation which would be hosted on single domain if possible on sub domain

Regards

That’s what block templates are for. You can load different CSS files for different sections of your site, as well as having different markup. No need for separate themes (that would be a maintenance nightmare).

See: https://gohugo.io/templates/blocks#base-template-lookup

Thanks for this! I am expanding my site and need to do exactly this. You pre-emptively gave me the solution! :slight_smile:

Back to lurk mode, waiting for solutions to my yet undiscovered problems…

I blended Hugo and Madoko. I needed document features more complex than Hugo can build. With Madoko I get HTML and PDF output that I build into the static directory, Hugo then builds them into the final website.

1 Like

I have it working with Asciidoctor now too. Demo repo here: https://gitlab.com/bwklein/hugo-with-asciidoc-content