Generates a browsable HTML website from Markdown notes

df05ec8 Made some strings const

~tagglink pushed to ~tagglink/notes git

10 months ago

f7bb4a6 replace _WIN32 macro with USE_CARRIAGE_RETURN

~tagglink pushed to ~tagglink/notes git

10 months ago


A fast and minimal knowledge-management system written in C and rendered in HTML.

It was inspired by memex engine Oscean and is powered by the markdown parser MD4C.


  • Parsing of notes in markdown format.
  • Tag-based note organization.
  • Sort the note order however you like before running.
  • Only notes marked public are also copied to a remote directory.
  • Generates in less than a second.



clang notes.c md_renderer.c md4c/md4c.c helpers.c

Clang is the most accessible C compiler for windows users and the one I use, but it should compile with any C compiler that supports C99.


Example invocation: notes -h head.html -f foot.html -p ../remote/ -l ../local/ note1.md [note2.md ...]

The file passed as the -h argument will be appended to the beginning of every resulting HTML file, and the -f file to the end. The -h file must contain two occurrences of %s, where the first will be replaced by the note's title, and the second with the note's nav. Different navs are generated depending on whether the file being generated is a note, a tag index, or the root index.

Two static websites in two different directories are always generated, where the directory given to -p contains only the notes that specify public: yes in their metadata, and the -l directory contains all notes.

The arguments have the following defaults if not specified: -h head.html -f foot.html -p ../remote/ -l ../local/

After those options, specify any number of paths to note files. The note files should specify title¨: <note title>, tags: <comma-separated tags> and public: <yes/no> in their first three lines (most likely breaks at the use of UTF byte order marks in the beginning of parsed files).

Example head.html:

<!DOCTYPE html>
  <meta charset='UTF-8' />
  <title>%s - notes</title>
  <link rel="stylesheet" href="/css/style.css" />
  <link rel="icon" href="/res/icon-128x128.png" type="image/png" sizes="128x128" />
  <link rel="icon" href="/res/icon-64x64.png" type="image/png" sizes="64x64" />
  <link rel="icon" href="/res/icon-32x32.png" type="image/png" sizes="32x32" />
  <link rel="icon" href="/res/icon-16x16.png" type="image/png" sizes="16x16" />
    <a href="/index.html">node</a>

Example foot.html:

    <a href="https://sr.ht/~MeOnSourcehut/"><img src="/res/sourcehut.svg"></a>
    <span>My Name</span>


Notes uses MD4C for parsing Markdown (very, very quickly!).


You are more than welcome to contribute, but as this is a quite personal project, if your contribution does not align with my personal vision, the contribution will not be accepted.

I highly encourage you to only make changes to this program that are useful to you, regardless if I choose to accept them or not.


  • Provide the choice of generating only public notes as a command line option