Draft documents of RP
This project uses md-to-pdf with Tailwind CSS Typography to generate beautifully styled PDFs from Markdown files.
npm installTo generate PDFs from all Markdown files:
npm run pdfThis will:
- Build the Tailwind CSS styles with the Typography plugin
- Clean existing PDF files
- Generate new PDFs with enhanced typography
npm run build:css- Build Tailwind CSS stylesnpm run clean:pdf- Remove all generated PDFsnpm run pdf-debug- Output HTML instead of PDF for debugging styles (usage:npm run pdf-debug -- path/to/file.md)
The Tailwind configuration is in input.css with the Typography plugin enabled:
@import "tailwindcss";
@plugin "@tailwindcss/typography";The PDF generation is configured in md-to-pdf.config.js with:
- Tailwind Typography prose classes for beautiful typography
- A4 format with 25mm margins
- Print background enabled for styled elements
You can customize the configuration by editing md-to-pdf.config.js.
Add front-matter at the top of any markdown file to use custom Google Fonts:
---
stylesheet:
- https://fonts.googleapis.com/css2?family=Crimson+Pro:wght@400;700&display=swap
css: |-
.prose { font-family: 'Crimson Pro', serif; }
---Browse fonts at Google Fonts.
active/- Active draft documentsarchives/- Archived documentschats/- Conversation logs and notesinput.css- Tailwind CSS source fileoutput.css- Generated CSS output (built by Tailwind)