yakivmospan / github-wikito-converter

Generate HTML & PDF documentation from Github wiki or any other markdown-based wiki.
Other
293 stars 52 forks source link

A Toc item does not start at new page #13

Open PRijnbeek opened 6 years ago

PRijnbeek commented 6 years ago

I would expect that a new TOC item (h1) would start on a new page in the pdf. How to enforce that?

Thanks

yakivmospan commented 6 years ago

Add the:

<div style="page-break-before: always !important;"/>

Before your header in .md file. I'm doing like so :


### Client

The `Client` is basically a singleton shared within one process. To get an instance of the client, call the `getInstance()` method from the `TornadoClient` class.

<div style="page-break-before: always !important;"/>

### Workflow

![](assets/client-workflow-diagram.jpg)

This will start a Workflow header on new page in PDF.

yakivmospan commented 6 years ago

At the moment there's no possibility to enforce this automatically, only manually by changing the .md files as showed above.

But it should be not hard to provide another option to the tool, that will enable/disable this functional by adding page-break-before div before new Header in generated html.