Multiple pages in one html page with separate md files

https://stackoverflow.com/questions/19289105/multiple-pages-in-one-html-page

How would I achieve the effect shown in the answer, but so that the content of each span (probably change it to a div) is sourced from a markdown file, so that Hugo can be used as normal, but that each ‘page’ is still part of the one HTML file.

  • Use the range function to render the different pages you want in a single HTML page.

  • Then hide the content of all except the first one.

  • Show and hide the other page’s content with whatever navigation you prefer:
    i.e. Show page 1, 2, 3.

By the way you can do all this without using any JS. Search for “checkbox hack” (in the search engine of your choice) to find articles about hiding and showing content with CSS only.