Change Log v1

This page will be updated with changes to Markugen upon each new release. The log was started at version 1.1.0 and will be continued for each new release moving forward.

v1.2.0

This release fixes a number of issues that were found while working on PDF generation.

Error Handling

When errors are encountered during construction or generation, they are now thrown. In previous releases, errors would be output to the console and process.exit() was called which would crash your application. This change means you should wrap your Markugen calls in a try/catch block like so:

.js
try
{
  const mark = new Markugen({...});
  mark.generateSync();
}
catch(e)
{
  // handle the error here
}

PDF Generation

PDF generation was not fully flushed out in previous releases; therefore, some improvements were made to how PDF documents are generated.

Output Options

Two new options were added for customizing the output that is generated:

Miscellaneous

v1.1.2

This is a very small release that exports some extra utility functions and adds the Markugen.findChrome function as a callable function for use by modules using Markugen.

v1.1.1

This is a minor version for fixing issues with PDF generation.

v1.1.0

This version is mostly a fix for print views and adding PDF generation. The reason for the minor increment is due to generation being asynchronous now.

Async Generation

Markugen.generate is now asynchronous and should be awaited:

Pre v1.1.0
.ts
// setup markugen and tell it where to find your files
const mark = new Markugen({
  input: 'markdown',
});
// generate the website
mark.generate();
Post v1.1.0
.ts
// setup markugen and tell it where to find your files
const mark = new Markugen({
  input: 'markdown',
});
// generate the website
await mark.generate();

PDF Generation

This release now has two new options: --pdf and --pdf-only. These new options will generate PDF versions of each markdown page given as input. The resulting PDF documents will be linked to each other as well. The --pdf-only option will only generate the PDF files and no HTML files.

When printing a page from the resulting HTML output, there are a few components that do not react to printing very well.

  1. Code blocks that present with a scroll bar in the browser due to overflow will be extended in the print view to ensure all code is displayed.
  2. Tabs will be broken into separate views when printing to ensure all tabs are visible.
  3. The table of contents will be moved to the top of the page in print view to provide relative page linking and contents when printing.