catcrafts.net/interfaces/Catcrafts-Blog.cppm

31 lines
953 B
Text
Raw Normal View History

2025-11-12 20:58:07 +01:00
/*
catcrafts.net
Copyright (C) 2025 Catcrafts
The source code of this website is made available for viewing purposes only.
No permission is granted to copy, modify, distribute, or create derivative works.
*/
export module Catcrafts:Blog;
import Crafter.CppDOM;
import std;
using namespace Crafter;
export namespace Catcrafts {
struct BlogPost {
std::string name;
2025-11-12 21:56:18 +01:00
std::string slug;
2025-11-12 20:58:07 +01:00
std::string date;
std::string content;
};
std::vector<BlogPost>* posts = new std::vector<BlogPost>{
{
2025-11-12 21:02:01 +01:00
"Hello World!",
2025-11-12 21:56:18 +01:00
"hello-world",
2025-11-12 20:58:07 +01:00
"2025-11-12",
2025-11-12 21:02:01 +01:00
R"(Welcome to catcrafts.net!<br><br> This blog will mostly be dedicated to random tidbits i come across while working on my Crafter series of libraries, This website is fully written in C++ using the Crafter.CppDOM library.)"
2025-11-12 20:58:07 +01:00
}
};
2025-11-12 21:56:18 +01:00
void RenderBlog();
void RenderBlogPost(const std::string_view slug);
2025-11-12 21:24:23 +01:00
}