Skip to content

Commit

Permalink
Update README.md: webserver
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgio committed Dec 1, 2024
1 parent 9a8457b commit 9a9b711
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Built with Quarkdown itself — <a href="demo/demo.qmd" target="_blank"><strong>
- **HTML**
- :white_check_mark: Plain output (default)
- :white_check_mark: Slides (via [reveal.js](https://revealjs.com))
- :white_check_mark: Paged (books, articles) (via [paged.js](https://pagedjs.org))
- :white_check_mark: Paged (books, articles) (via [paged.js](https://pagedjs.org)) - *Requires a webserver. See [Server](#server) below.*
- Quarkdown's HTML is PDF-ready: check the [wiki](https://github.com/iamgio/quarkdown/wiki/pdf-export)
to learn how to convert an artifact to PDF.
Expand Down Expand Up @@ -200,6 +200,10 @@ If you would like to familiarize yourself with Quarkdown instead, `quarkdown rep

- **`-l <dir>`** or **`--libs <dir>`**: sets the directory where external libraries can be loaded from. If unset, defaults to `<install dir>/lib/qmd`. [(?)](https://github.com/iamgio/quarkdown/wiki/importing-external-libraries)

- **`-s`** or **`--use-server`**: inject additional code to communicate to the webserver, in order to reload the browser automatically after compiling;

- **`--server-port <port>`**: optional customization of the webserver's port. Defaults to `8089`.

- **`--pretty`**: produces pretty output code. This is useful for debugging or to read the output code more easily,
but it should be disabled in production as the results might be visually affected.

Expand All @@ -211,6 +215,23 @@ If you would like to familiarize yourself with Quarkdown instead, `quarkdown rep

- **`-Dloglevel=<level>`** (JVM property): sets the log level. If set to `warning` or higher, the output content is not printed out.

### Server

Quarkdown's webserver allows direct communication between the compiler and the browser,
enabling automatic content reloading. Live reloading will also be available in the near future.

> [!IMPORTANT]
> A webserver is **mandatory** in order to show *paged* documents, because of a paged.js requirement.
> For that purpose, you can also use other servers, such as Visual Studio Code's *Live Preview*, if you prefer.
The server can be started via `quarkdown start`, with the following options:

- **`-f <file>`** or **`--file <file>`**: (*mandatory*) the file the server should point to. It would preferably be the output directory of the compilation.

- **`-p <port>`** or **`--port <port>`**: the webserver's port. If unset, defaults to `8089`.

- **`-o`** or **`--open`**: if set, opens the target file in the default browser.

## Themes

Quarkdown comes with a set of themes that can give a unique look to your document.
Expand Down

0 comments on commit 9a9b711

Please sign in to comment.