Specific use case: is hugo able to do this with minimal effort

Hello here,

Sorry if this question seems totally dumb. I read some tutorials and went through a first example, but my use case is a little bit specific and I cannot quickly find if it is doable without too much work (I have a hard and short deadline for everything to be correct).

Use case : I have a university course that consists in a set of HTML pages (organised in sections/subsections). These pages were up to now inserted in their source form into an LMS (EdX), so all navigation content was handled by the LMS itself.

I want to get rid of this LMS (and hopefully not fall into the trap of another one) and consider hugo to generate a static web site, handling the navigation stuff and serving the original HTML content. For this purpose, I am considering the relearn theme.

So, Question 1 is : can HTML files be the source of a page ? (and automatically added to the content). Or should I back each page with an .md file that will somehow include the HTML ? If I need an .md file, what should be in it ?

Question 2: all assets (figures, algorithms, etc.) are produced automatically in svg form from latex source files (all these are maintained through a Makefile). What is the most β€œhugo friendly” organisation ?

  • automatically put all svgs in the assets folder and keep all sources in data folder?
  • (prefered) keep .tex files in the page bundle that uses it and produce the .svg in the same place and directly refer to it (I do not want the .tex file to be present in the resulting public folder?

Thanks for all your opinions/help,

Gilles

content structure

content/
β”œβ”€β”€ lesson-1/
β”‚   β”œβ”€β”€ dna/
β”‚   β”‚   β”œβ”€β”€ dna-figure.svg
β”‚   β”‚   β”œβ”€β”€ dna-figure.tex
β”‚   β”‚   └── index.md
β”‚   β”œβ”€β”€ rna/
β”‚   β”‚   β”œβ”€β”€ index.html     <-- must have front matter
β”‚   β”‚   β”œβ”€β”€ rna-figure.svg
β”‚   β”‚   └── rna-figure.tex
β”‚   └── _index.md
└── _index.md

site configuration

[[module.mounts]]
source = 'content'
target = 'content'
excludeFiles = '**.tex'

published site

public/
β”œβ”€β”€ lesson-1/
β”‚   β”œβ”€β”€ dna/
β”‚   β”‚   β”œβ”€β”€ dna-figure.svg
β”‚   β”‚   └── index.html
β”‚   β”œβ”€β”€ rna/
β”‚   β”‚   β”œβ”€β”€ index.html
β”‚   β”‚   └── rna-figure.svg
β”‚   └── index.html
β”œβ”€β”€ favicon.ico
└── index.html
1 Like

I don’t understand what should go in that necessary front matter. I’m so used to .md files I had not registered frontmatters applied to all files.
if my file.html is under /content/essai/, how do I refer to it from the frontmatter, or do I also need an index.md ? I read What is a better way to include a full external html page and its resources into blog - #2 by RickCogley but option 2 is the only I didn’t understand.

All content files need front matter, regardless of content format: markdown, html, pandoc, asciidoctor, rst, org. At a minimum you must include format (TOML, YAML, or JSON) delimiters.

content/about.html

+++
title = "About us"
date = 2023-07-21T10:38:27-07:00
+++

<strong>Hello world</strong>