Including Static HTML pages in Portal Web Pages?

Hi all,

Is there a straight-forward way to point the Web Page → Main Section to static HTML files on the filesystem?

I have a custom app that is currently configured via I also have several Portal webpages defined in Website->Web Page with routes set. e.g. About Us, FAQ, T&C, etc. The content is copy-pasted into the Main Section. All this works fine.

But I would like to track the html in those web pages (Main Section) in git instead of in mariadb. So I’m looking for a way basically just include a static HTML file from this section.

Thanks in advance.

I’ve found some context in the frappe docs on how to do this.

It seems to require a controller with the get_context method. The trick is to have an empty .py file with the same name your .html file.

You should be able to then access your static html files at <siteurl>/<filename>. You don’t need the .html extension.