I have a LibreOffice spreadsheet that I have converted to a HTML file at https://tableizer.journalistopia.com/. I am trying to show this file on my Hugo website.
When I view this file with my web browser (Firefox) it shows up just the way I want it.
I have tried including the HTML code within my *.md but nothing shows when I build the site. I have read some articles of linking to the file from the *.md file but they were talking about *.json files not *.html or would it work with either type of file?
Is there something I need to include in the *.md file to show the code is actually HTML code?
I think the best way to show a HTML file is to put it to a static folder (Static Files | Hugo), Hugo will serve it but will not generate it like a Markdown file.
(You can also display HTML content into a Markdown file, but:
be careful of having two head (I don’t know how your HTML file is structured
you must have a right config with unsafe = right for Goldmark rendering (Configure Markup | Hugo))
Something I like to do in this situation is build a new page layout in the /layouts/_default directory that will display the other HTML generated files in my site as an iframe, that way I can still display my site’s header and search.
If you paste this into the body element of an HTML file, validation will fail. The validator expects all style elements to be within the head element. If we move the CSS to a stylesheet, we’re left with this:
If you paste this into a markdown document and build your site, the table will not appear. Why? View the source (typically Ctrl+U) in your browser:
<!-- raw HTML omitted -->
By default, the markdown renderer (Goldmark) considers raw HTML within markdown to be unsafe. To include HTML in your markdown, change your site configuration:
Thanks to all who contributed to my question.
I finally figured out how to do what I wanted.
I stored the *.HTML files in the /static directory and then in my *.md file I entered . It would display the Table name but not the Table. I then removed the “!” and it displayed the table.
What I liked about the Tablizer program is that it created a box around each cell to make each one stand out more.
When I exported the spreadsheet from LibreOffice it would create the HTML file but without the grid lines to define the rows and columns…
I currently have 15 columns and 57 rows so without the grid lines it made it hard to read.
Again, Thanks to all who showed me the light on how to get it accomplished.