wll8 / markdown-to-file

Converts Markdown files to pdf, html, png or jpeg files.
Other
8 stars 0 forks source link

Adding Custom Styling #1

Closed jrg94 closed 1 year ago

jrg94 commented 1 year ago

Thanks for putting this together! I use it to automate PDF generation in one of my repos. One thing that bugs me about the project that this repo depends on is their switch to the yellow/brown color for inline code. I would like to be able to provide my own stylesheet, but I can't seem to do it with the current CLI tool. It seems the styles setting requires a list, which I can't provide on the CLI. Instead, I get something that looks like this:

options: {
  pdf: true,
  outputDirectory: 'E:\\Projects\\teaching-portfolio\\renders\\cse2221',
  styles: 'E:\\Projects\\teaching-portfolio\\scripts\\markdown.css'
}

Where the styles value is a string instead of a list. No additional brackets seem to do the trick either. Any suggestions would be awesome!

wll8 commented 1 year ago

Processed. Please try after updating.

image

see: https://github.com/wll8/markdown-to-file/commit/a74ddfa30ed1e108ccb31f9e8cab41344fbc6e68.

npm i -g markdown-to-file@1.5.0

# Use commas to separate multiple items.
m2f file.md pdf styles=D:/a.css,D:/b.css
jrg94 commented 1 year ago

Works exactly as expected! Thank you.