adds rss feed support to blog

This commit is contained in:
Rosia E Evans 2024-08-08 11:41:42 +01:00
parent 6d627aa9b4
commit d8253d3333
117 changed files with 5336 additions and 326 deletions

View file

@ -35,6 +35,16 @@ Page::Page(std::string sourceFileUrl, std::string outFolderUrl)
this->outFileUrl = outFolderUrl + getRelativeOutUrl();
}
std::string Page::getLastTimeEdited()
{
struct stat attr;
stat(sourceFileUrl.c_str(), &attr);
char timeString[std::size("yyyy-mm-ddThh:mm:ssZ")];
std::strftime(std::data(timeString), std::size(timeString),
"%FT%TZ", std::gmtime(&attr.st_mtime));
return timeString;
}
std::string Page::getSourceFileContents()
{
return sourceFileContents;