Forum Discussion
Handling Raw HTML Webpages
I'm not sure hosting the HTML pages as an embed would be a great idea. It might be better spinning up a web server in Azure and hosting the pages.
As an alternative, have you considered creating SharePoint pages instead of HTML pages? Not sure exactly what you have in your pages, but here's an example of how you would take some CSV data and create a page for each row.
For this example, I just generated three rows for animals including a link to Wikipedia for more info.
And the PowerShell script that creates a page for each animal. You'd just have to change YOUR_TENANT, YOUR_SITE, and YOUR_CLIENT_ID.
Connect-PnPOnline -Url "https://YOUR_TENANT.sharepoint.com/sites/YOUR_SITE" -ClientId "YOUR_CLIENT_ID" -Interactive
$rows = Import-Csv -Path "C:\Scripts\SPO\PageWebParts\AccessItems.csv"
foreach($row in $rows) {
#Get values from the current row
$name = $row.Name
$description = $row.Description
$countryOfOrigin = $row.CountryOfOrigin
$species = $row.Species
$diet = $row.Diet
$link = $row.Link
Write-Host "Processing Page: $($name)" -ForegroundColor Yellow
#Add a new page using the name for the page name and title
$pnpPage = Add-PnPPage -Name $name -Title $name -LayoutType Article -CommentsEnabled:$false
#Add a section to the page
Add-PnPPageSection -Page $pnpPage.Name -SectionTemplate OneColumn
#Build up the body using values from the CSV
$body = @"
<h4>Description</h4><p>$description</p>
<h4>Country of Origin</h4><p>$countryOfOrigin</p>
<h4>Species</h4><p>$species</p>
<h4>Diet</h4><p>$diet</p>
<p><a href='$link' target='_blank' title='$name'>More info</a></p>
"@
#Add a Page Text Part using the body
$null = Add-PnPPageTextPart -Page $pnpPage.Name -Section 1 -Column 1 -Order 1 -Text $body
#Publish the page
$pnpPage.Publish()
}
The final output is shown below (page created for the Brown Bear). You could add as many sections, columns, and webparts as you like depending on your needs.
Might not be what you are looking for, but I thought I'd share it as an alternative.