All static site generation is now removed and mdzk works purely as a CLI (or library) for querying your note vault for forward/backward links.
- Wikilinks are no longer parsed---use regular markdown links instead.
- Static site generation is no longer built-in. You can use an external tool like Hugo or Zola to generate a static site from your mdzk vault.
- The default JSON output is now a list of notes, instead of an object
containing only one key,
notes
. - The
content
field on each note is removed. - The
date
field on each note is removed.
- Obviously a massive increase in performance
-
#70: Fixed issue where parentheses were not allowed in internal links.
577e84c: allow non-square brackets in internal links
-
#66: All CSS variables can now be changed directly in the configuration file. For example, say you want to set the variable
--sidebar-bg
tored
. To do this, you can simply add[style] sidebar-bg = "red"
This should work for all CSS variables.
-
#66: Add any custom CSS through the configuration file. You can either write CSS as a string directly in
mdzk.toml
, like this:[style] additional-css = """ <CSS here> """
or you can load a separate CSS file, like this:
[style] additional-css = "path/to/file.css"
Paths are relative to the
mdzk.toml
file.
- #66: mdzk now has a custom renderer and a new look. Everything should look more clean and polished, and you can expect some performance improvements as well.
- #66: KaTeX is no longer loaded through a CDN, but written to the generated site. This means your mdzk will work offline as well.
- #66: The default renderer is no
longer
mdbook
, butmdzk
. You can change back to rendering with mdBook by adding--renderer mdbook
after the build command.
- #67: You could previously not use
?
characters in a title, because they were not escaped properly in URLs. This is now fixed with the introduction of our custom renderer. - #66: Note titles are now added to the search index as well.
- #66: You can no longer theme mdzk
like in mdBook (by adding a directory called
theme
). See above for how you can customize your mdzk.
-
#55: You can now turn off each preprocessor feature of mdzk separately. This is done with the following configuration values:
[build] # ... front-matter = false math = false readme = false math = false
More about these features and what they do, can be found in the documentation.
-
#39: Wikilinks now support blockreferences. Mark a paragraph with an ID by appending it with a space, a
^
and then a six-character ID. Then you can link to this paragraph, by using the syntax[[Note^#id]]
, whereNote
is the name of the note andid
is the ID of the paragraph. You can read more about blockreferences in the documentation.
- #54: Our separate preprocessor crates are now moved to within the mdzk crate. This allows us to avoid iterating over the vault multiple times, which drastically increases the efficiency.
- #45: New custom made user interface, for a friendlier look. Expect more informative messages from this update and on.
- Enabled pulldown-cmark's SIMD accelerated scanners.
- #63: Fixed buggy KaTeX rendering and simplified the rendering code a lot. Special thanks to @TheFr1nge for fixing this.
- #41: mdzk will not panic on invalid TOML anymore, but rather print an error message coupled with the configuration content and a description of what part of it is invalid.
- #40: mdzk now checks whether you
updated your
mdzk.toml
correctly or not. If a[book]
section is found in yourmdzk.toml
file, a warning will appear that prompts the user to change it to[mdzk]
. - When loading the mdzk from another directory than the root directory, parsing the summary would throw an error, as the path to it was not absolute. This is now fixed, which means you can build an mdzk located anywhere, from anywhere.
-
New
generate-summary
key at the[mdzk]
section inmdzk.toml
that controls whether mdzk will generate your summary file automatically or not. The default value istrue
. -
New
preprocessors
field under the[build]
section inmdzk.toml
. This lets you define mdBook preprocessors to be run after the default preprocessors. Order is preserved. -
New
draft
option in the front matter. Setting this totrue
will skip rendering for that note.NOTE: Beware that the note will still show up in the index, as that is how mdBook handles draft chapters. We will probably change this behaviour as soon as we release our custom renderer. If you want to hide a note completely from your vault, use the
ignore
field inmdzk.toml
.
- Removed several dangerous
unwrap
s, to make the codebase more robust. - The Nix build now supports Apple Silicon as well.
- Dependencies have been cleaned up, leading to a slightly smaller binary size.
- New version of mdbook-wiklinks (0.4.0), that replaces regexes in favor of a combination of pulldown-cmark's iteration and a custom Pest parser. This should decrease build times drastically.
- Math delimiters are now converted into spans/divs on build. This will hopefully make KaTeX support more robust, and ignore math rendering within code and links.
-
#38: User-defined preprocessors (through the mdBook-style
preprocessor.<name>
pattern in the config file) would sometimes interfere with mdzk's default preprocessors. This fix converts all of these preprocessor-statements into thepreprocessors
field mentioned above, which mdzk can handle the order of.NOTE: To simplify compatibility between mdzk and mdbook, we assume the preprocessor has a command on the form
mdbook-<name>
. Other preprocessors are simply not supported yet. Fields are ignored, so you can only turn preprocessors on or off. -
#24:
mdzk.backlinks-header
in the config had no defuault value, which made mdzk panic when it was not set. This is now fixed.
This is a quick update that should make compiling mdzk easier (and even possible) for Windows users.
We have also experienced some trouble with Windows Defender flagging pre-compiled mdzk binaries as a trojan. This is a false positive. A report is submitted to Microsoft, and we have removed all previously released Windows binaries. We suspect the warning is related to the amount of embedded JavaScript that is contained in mdzk. Hopefully, you will not get any warnings from this version and onwards. If you do, please leave a comment with a screenshot of the warning in this issue.
- When naming a file the same name as it's parent directory, this file will work as the content of that directory. Namely, the directory will itself function as a note.
- Our dependency on
mdbook-katex
, and subsequently QuickJS, did not work well with most Windows computers. To circumvent this, KaTeX is now loaded from a CDN and handles the rendering client-side. This shouldn't lead to any significant increases in load time, but it is not ideal for offline usage. We are working on embedding KaTeX locally in the generated output, which hopefully will be included soon.
- The mdzk renderer now converts
.md
into.html
in links/images during rendering.
- Fixed
init
command. It did not produce a correctly formatted config file, and a subsequent build failed.
- The
[book]
table header inmdzk.toml
is now changed to[mdzk]
. You will need to change this in your own configuration, or else the values will be ignored. - The
disable-default-processors
configuration option is now placed under the[build]
table.
- An
ignore
field is added under the[mdzk]
table. This is a list of gitignore-style patterns that specify files or directories which mdzk should ignore when building. - The header above the backlinks can now also be configured under the
[mdzk]
table, with thebacklinks-header
field. Both this and the previouspreprocessor.backlinks.header
field are supported, but you are recommended to use the former, in case we might remove the latter. - You can now choose a renderer with the
--renderer
or-r
flag when runningbuild
orserve
. The choices are betweenmdbook
,markdown
ormdzk
, the latter being our own work in progress custom renderer. This feature is mostly for debugging purposes.
- We now use our own configuration struct. This will allow us to more easily expand mdzk with more options and configuration.
- The mdzk renderer now copies over KaTeX locally in the output, to ensure speedy math rendering.
- The mdzk renderer now uses the Inter font.
0.3.7 moves mdzk to a monorepo structure. No other changes.
- The binary's size is now a lot smaller. (f5e6ca4b4bc98e98a3f28a5859665a332ff10262)
- Sorting now works with non-ASCII characters. (16bb74d62314c4bdaa75809b64caae3e9b2ec7dc)
- Summary is now sorted by directories first. (78f98d040fe4674c34571d115d8e7de10c14eb97)
- Added
*.hbs
files to Cargo.toml. (3b4bcd98374b4463143fd81cf621b97c198bafae)
- Moved to
lazy_regex
for lazy evaluation of regexes instead of doing this manually withlazy_static
. This hopefully brings some minor speed improvements.
'
and"
threw errors when compiling, because these characters were escaped in their filename, meaning mdzk could not find the source.- The URLs produced by our preprocessors did not escape special characters
properly. This is now fixed, meaning URLs should all work properly again.
Unsupported characters are documented in the
README, but repeated
here:
=
,\``,
^,
#,
|,
:,
/,
[and
].
$` is supported, but not recommended, as it might intefere with the KaTeX math delimiters.
- New front matter field: Use the
date
(string) field to add a date to the note. The datestring must comply with ISO 8601, with seconds and timezone being optional. If no timezone is specified, the local timezone will be used, though the timezone information is not utilized at the moment.
- You are now able to use TOML in the front matter, if that suits your fancy.
- The
IndexPreprocessor
bundled with mdBook is improved for mdzk and now replaces all links toREADME.md
intoindex.md
. This means you can use the Markdown convention of naming the main page README without having broken links/backlinks.
- Once again fixed a hot-reloading loop caused by tracking changes on the summmary file.
- Prettier log messages. There should be a lot less verbosity when running mdzk now.
-
mdzk now has a set of defined global variables for the directory tree:
- Source directory:
notes
- Build directory:
html
- (!) Config file:
mdzk.toml
- (!) Summary file:
.mdzk_summary.md
(located within the source directory)
You will (sadly) have to change the files marked with (!) manually for the new version of mdzk to work.
The advantage of hiding the summary file is that Obsidian users can enjoy their graph view without it being ruined by one monolithic
SUMMARY.md
node. - Source directory:
mdzk init
produces a directory tree completely according to the above specification. It does not pollute this tree with any default files like mdBook'schapter_1.md
.- We (hopefully) now use better HTML escaping, which means characters like
"
,'
and&
should be safer to use.
- Both wikilinks and backlinks now use relative paths, which means they should be completely functional regardless of how nested your notes are or how the vault is published.
Sporting the newest additions to mdbook-wikilink
and mdbook-backlinks
.
- Disable default processors with the
disable_default_processors
option.
mdzk serve
did not load the correct config, nor update theSUMMARY.md
file on file changes. This is now fixed.
- added the flags
port
andbind
to theserve
subcommand (https://github.com/mdzk-rs/mdzk/commit/033c071c9cf2a4855707a3ec0db0a612a82601ab)