catcrafts.net/interfaces/Catcrafts-Blog.cppm

37 lines
No EOL
1.2 KiB
C++

/*
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;
std::string slug;
std::string date;
std::string content;
};
std::vector<BlogPost>* posts = new std::vector<BlogPost>{
{
"Hello World!",
"hello-world",
"2025-11-12",
R"(Welcome to catcrafts.net!<br><br>
Here we believe optimization is everything and C++ is a gift from god.<br>
This blog will mostly be dedicated to random tidbits i come across while working on my Crafter series of libraries.<br><br>
Like this website which is fully written in C++ using the Crafter.CppDOM library.<br>
And source available too!<br>
<a href="https://forgejo.catcrafts.net/Catcrafts/catcrafts.net">https://forgejo.catcrafts.net/Catcrafts/catcrafts.net<a>)"
}
};
void RenderBlog();
void RenderBlogPost(const std::string_view slug);
}