Converter for markdown files to html. Using the cmark library.
  • C 33.7%
  • HTML 32.7%
  • CSS 17.3%
  • Shell 16.3%
Find a file
2026-06-12 22:53:09 +02:00
html adding a title and css to the test blog 2026-06-10 13:07:35 +02:00
markdown adding a title and css to the test blog 2026-06-10 13:07:35 +02:00
static/css adding a css file for the blogposts 2026-06-10 13:06:26 +02:00
autoconvert.sh adding arguments to the cmark command to transfer raw html to the blog 2026-06-10 13:07:17 +02:00
cmark.c starting writing on the c files, i'll work on in the future 2026-06-09 23:36:59 +02:00
converter.c starting writing on the c files, i'll work on in the future 2026-06-09 23:36:59 +02:00
LICENSE personalize the license file 2026-06-10 12:54:44 +02:00
md-html.service adding a example systemd file 2026-06-11 14:24:32 +02:00
README.md Improving the codebocks of the documentation 2026-06-12 22:53:09 +02:00

markdown-html-converter

A converter for markdown files to html files. Using the cmark library. At the moment the relevant action works via the shell script. The c files are a future project, to rewrite most of the covert process myself.

Requirements

  • cmark:
sudo apt install cmark
  • inotify-tools:
sudo apt install inotify-tools

Installation

Autoconvert script

To install the script either clone the repository.

git clone https://git.baumsplitter41.eu/BaumSplitter41/markdown-html-converter.git
cd markdown-html-converter

Edit the paths of WATCH_DIR and HTML_DIR in the autoconvert.sh if needed.
Note: if you want that folder cleaner, you cant delete the cmark.c and converter.c files. There not relevant at the current point of time.

Systemd

Edit the md-html.service:

  • set the executing user: User=username
  • set the path, where your autoconvert.sh file is: ExecStart=/bin/bash /path/to/autoconvert.sh

Drop the file into /etc/systemd/system/ and give it to the root user sudo chown root:root /etc/systemd/system/md-html.service Start and enable the service: systemctl enable md-html.service --now
Check if everything is working: systemctl status md-html.service

Now you can drop markdown files into the configured folder and they will be converted into a html file and placed into the configured html folder.