Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jguddas/markdown-pdf
https://github.com/jguddas/markdown-pdf
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jguddas/markdown-pdf
- Owner: jguddas
- Created: 2024-06-09T15:02:21.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-06-11T21:25:41.000Z (7 months ago)
- Last Synced: 2024-06-12T05:23:57.783Z (7 months ago)
- Language: TypeScript
- Homepage: https://markdown-pdf-nine.vercel.app
- Size: 335 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# markdown-pdf
Convert markdown files to PDF or HTML.
## Requirements
- https://nodejs.org
- https://www.princexml.com
- https://poppler.freedesktop.org### Check that the binaries can be found
```sh
which node prince pdfunite pdfinfo
```## Usage
```sh "pdf" "html"
node --import tsx/esm md-to-pdf.ts input.md output.pdf
node --import tsx/esm md-to-html.ts input.md output.html
```## Features
### Intelligently split pages at headings
When generating a PDF with multiple pages, the converter will split the document in a way that the page break does not occur in the middle of a section.
### Heading bar with icons
At the left side of the page there is a bar with fun icons.
### Pretty code blocks
https://rehype-pretty.pages.dev/#usage adds support for syntax highlighting and custom highlighted sections.
### Callout directives
https://github.com/Microflash/remark-callout-directives adds support for callout directives like `:::note` and `:::warning`.