#pragma once #include #include #include #include #include struct Metadata { std::string author; time_t date; std::string title; std::vector tags; }; // Reads the metadata of the markdown file // Metadata are in yaml format at the top of the file // They are separated from the rest of the file with `---` at the beginning and // at the end. // // Returns nullopt when no metadata is found in the file std::optional get_metadata(const std::string &FILE_PATH); // Reads the markdown file and converts it to html. // Return everything in one string std::string get_html(const std::string &FILE_PATH);