TheCedarPrince / NoteMate.jl

Tools for working with your own knowledge base
MIT License
11 stars 1 forks source link

Turn NoteMate notes into posts expected by Jekyll #16

Open AlphabetsAlphabets opened 1 year ago

AlphabetsAlphabets commented 1 year ago

Jekyll supports standard markdown the only thing to worry about would be to export it into an acceptable filename as Jekyll only registers files with the following format yyyy-mm-dd-<title> as a post. Some examples would be

  1. 2003-01-01-Post-on-Jan
  2. 2020-01-01-Post-on-Jan-but-later

If the file is named anything but this, it won't show up as a valid post when the site is built by Jekyll. As for parsing the actual content I'd say the only thing to parse would be the title block mentioned in the OKM post. Since Jekyll does have "title" as valid field when writing front matter.

TheCedarPrince commented 1 year ago

Oh neat this seems pretty straightforward to support actually! To address this, I would do the following:

  1. Look at the documentation for the Note object within NoteMate.jl: https://github.com/TheCedarPrince/NoteMate/blob/6d7ec382e2a413418d3ea1de01080a43cd4efb63/src/structs.jl#L8
  2. Build a new target file for Jekyll similar to https://github.com/TheCedarPrince/NoteMate/blob/dev/src/targets/franklin.jl that ingests a Note object
  3. Validate the output as a valid Jekyll file

In this case, we don't even need to touch a note but this works on the internals of NoteMate.jl itself. Thanks for opening the issue @AlphabetsAlphabets ! Let me know if you have any questions here!