Go to file
S David 582d736ee5 Stop reading the cmark target for include directories
Properly set public scope for link_libraries, so their header paths
are properly exported by consumers of mdml.
2024-03-30 14:37:48 -04:00
apps Run clang-tidy; improve types.hpp, added subheaders 2024-03-15 18:37:30 -04:00
cmake Update CMakeLists.txt to use IOCore library framewokr 2024-03-30 14:32:13 -04:00
data Add a directory scanner to detect application routes 2023-11-24 15:27:53 -05:00
editorconfig Editorconfig: remove lsp vim folding mode 2024-03-15 19:28:46 -04:00
include Switch from using references in Result class, to using getter methods. 2024-03-15 23:44:39 -04:00
scripts Fix unit tests, all tests now passing 2024-03-15 19:28:57 -04:00
src Stop reading the cmark target for include directories 2024-03-30 14:37:48 -04:00
tests Update CMakeLists.txt to use IOCore library framewokr 2024-03-30 14:32:13 -04:00
.clang-format Fix: .clang-format listed the same key twice 2023-09-24 07:21:02 -04:00
.clang-tidy Run clang-tidy; improve types.hpp, added subheaders 2024-03-15 18:37:30 -04:00
.gitattributes Update .gitattributes 2023-11-21 14:40:35 +00:00
.gitignore Update CMakeLists.txt to use IOCore library framewokr 2024-03-30 14:32:13 -04:00
Catch2.LICENSE Add Catch2 dependency copyright info 2023-11-21 14:26:51 +00:00
CMakeLists.txt Update CMakeLists.txt to use IOCore library framewokr 2024-03-30 14:32:13 -04:00
cmark.COPYING Add copyright information for dependency, 'cmark' 2023-11-21 14:26:51 +00:00
Doxyfile Commence refactoring and code style conformity changes 2024-03-15 13:12:54 -04:00
LICENSE Initial commit 2023-08-31 23:52:00 +00:00
README.md Write README.md 2023-11-28 22:42:44 -05:00

mdml-cgi

mdml-cgi is a C++ application designed to be used as a Common Gateway Interface (CGI) script by web servers. It facilitates the generation of HTML content by combining a template and a Markdown file. The project utilizes the cmark library for Markdown parsing. The license for the cmark library can be found in the root directory.

Features

  • Markdown to HTML: Convert Markdown content to HTML using the powerful cmark library.
  • Template Support: Generate HTML by combining a template with the parsed Markdown content.
  • CGI Integration: Seamless integration with web servers as a CGI script for dynamic content generation.

Dependencies

Building and Installation

  1. Clone the repository:

    git clone https://github.com/your-username/mdml-cgi.git
    
    
  2. Build the project:

    cmake -B release -DCMAKE_BUILD_TYPE=Release 
    make -C release 
    

    or

    cmake -B release -DCMAKE_BUILD_TYPE=Release  -G Ninja
    ninja -C release
    

Testing

Unit tests for mdml-cgi are implemented using the Catch2 framework. To run the tests, execute:

cmake -B debug -DCMAKE_BUILD_TYPE=Debug 
 make -C debug ctest

or

cmake -B debug -DCMAKE_BUILD_TYPE=Debug  -G ninja
ninja -C debug ctest

Usage

To use mdml-cgi as a CGI script, follow these steps:

  1. Configure your web server to recognize mdml-cgi as a CGI script.
  2. Ensure the required dependencies are installed.
  3. Place your Markdown file and template in a designated directory.
  4. Make a request to the CGI script, passing the Markdown file and template as parameters.

License

This project is licensed under the Mozilla Public License.

Contributing

Please feel free to submit pull requests, but this project is a small personal project for now, that I'm using to build a portfolio and expose myself to modern C++.