I’m struggling to show a HTML file as a content. After hours reading past postings, I still don’t find a good solution.
I have created a HTML file with its own styling generated using RStudio for my R-project or Quarto for my Python-project. I want to show this HTML file in my website under “Projects” section. I am aware that the normal workflow is create contents using markdown. But for some coding projects, I have already HTML files to showcase my findings.
I built my website using Hugo Framework and Ananke theme.
Current workaround:
The reader just need to open projects page and click the following:
Click on the project in yellow box (as can be seen above),
If you scroll down the link, you will find 2 little blue web symbols.
The reader needs to click the web icon in order to open a HTML file.
This is acceptable for that project site but not for my current new one.
Desired result:
The same as above but without step number 3 (without intermediate page from step 3).
Step number 2 should leads to the HTML file from step 4.
Oh no. Template code goes in templates. Content goes in content.
Try this:
git clone --single-branch -b hugo-forum-topic-44042 https://github.com/jmooring/hugo-testing hugo-forum-topic-44042
cd hugo-forum-topic-44042
hugo server
This uses the Ananke theme. Project 3 is linked to the static HTML. And I’ve moved the static HTML file from the static directory to assets (helps with URL resolution in some cases).
In the root of the project, in the layouts directory, I have overridden 3 of the Ananke templates.
Create content/post/project-5.md and with following content:
+++
title = 'Price Elasticity'
date = 2023-04-23T19:36:23-07:00
draft = false
featured_image = 'images/project-5/price_elasticity.png'
relPermalinkOverride = '/docs/project-5/price_elasticity.html'
tags = ['Python', "Data Analytic", "Finance"]
+++
Description: This article is about how to use price elasticity theory to determine optimal price that maximize revenues.
Insert HTML file into: assets/docs/project-5/price_elasticity.html
If I use the date with green mark, then the post appears. But if I change back to date with red mark, then the post disappears. I also include my current local time (Berlin) in my screenshot. I only changed the date.
I hope someone could explain to me, why it is behaving like that. @jmooring I’ll mark your answer as solution after someone could comment this behaviour. If noone comments it after 3 days, I will mark your answer as solution.