Based on your description, I understand that you want to create 30 modern pages with template based on a csv file.
First, you could create a site template in the site pages library, then create a csv file to store the site collection information, after that, run following PowerShell to create 30 modern pages with template based on a csv file. But you cannot set description and page body for newly created modern pages, due to they are not available parameters of Set-PnPClientSidePage command.
Connect-PnPOnline -Url "https://mytenant.sharepoint.com/sites/SiteName"
# load the CSV file into a variable for looping
$CSV = import-csv -Path 'C:\Users\RD\Desktop\Products.csv'
# set the path to my SharePoint sites Site Pages folder
$sitePath = '/sites/SiteName/SitePages/'
# load the page template we created earlier
$template = Get-PnPClientSidePage -Identity "Templates/Product-Template"
# loop over all the rows in the CSV file
foreach ($row in $CSV) {
# set the full file name from the FileTitle in the CSV and add .aspx
$fullFileName = $row.FileName + '.aspx'
# create a variable for the full path to the file
$fileURL = $sitePath + $fullFileName
# save a new SharePoint Page based on the Page Template we loaded earlier
$template.Save($fullFileName)
# run Set-PnPClientSidePage using the identity of the file we just saved to set the title and
# publish the page which is required before creating a navigation node
Set-PnPClientSidePage -Identity $fullFileName -Title $row.PageTitle -Publish
# add the page to the QuickLaunch navigation which is at the top of Communication sites
$nav = Add-PnPNavigationNode -Title $row.NavTitle -Url $fileURL -Location "QuickLaunch"
}
Reference:
PowerShell: Create SharePoint Online pages from a template and add them to navigation
Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.