Code Monkey home page Code Monkey logo

Comments (12)

rabidaudio avatar rabidaudio commented on May 22, 2024

+1

May send a PR for this in the future

from markdown-pdf.

sankethkatta avatar sankethkatta commented on May 22, 2024

πŸ‘ Would love this as well

from markdown-pdf.

qiutiaoming avatar qiutiaoming commented on May 22, 2024

+1

from markdown-pdf.

belyan avatar belyan commented on May 22, 2024

+1

from markdown-pdf.

ckreon avatar ckreon commented on May 22, 2024

Why isn't it compatible at the moment? Shouldn't you be able to point to the github-markdown css file with the options.cssPath?

options.cssPath

Type: String
Default value: [module path]/markdown-pdf/css/pdf.css

Path to custom CSS file, relative to the current directory.

Edit: I see the issue, you have to change the properties. I'll make a PR.

from markdown-pdf.

ckreon avatar ckreon commented on May 22, 2024

I made a pull-request to address this - #91.

from markdown-pdf.

brunowego avatar brunowego commented on May 22, 2024

Thanks @ckreon

from markdown-pdf.

marcosdiasdev avatar marcosdiasdev commented on May 22, 2024

@ckreon I got your PR modifications and added the options object like in your README.md but it's still not being styled.

from markdown-pdf.

ckreon avatar ckreon commented on May 22, 2024

@timarcosdias Can you show your config/script?

from markdown-pdf.

marcosdiasdev avatar marcosdiasdev commented on May 22, 2024

@ckreon I added pdf_ghm.css to my markdown-pdf installation and my code looks like:

var options = {
  cssPath: 'C:/Users/Marcos/node_modules/markdown-pdf/css/pdf_ghm.css'
}

markdownpdf(options)
  .concat
  .from(mdDocs)
  .to(bookPath, function () {
    console.log("Created", bookPath)
  })

I get no different result without the options object.

from markdown-pdf.

ckreon avatar ckreon commented on May 22, 2024

@timarcosdias Try grabbing just the CSS file from my PR - and save it to your local drive. Use the current official release of MarkdownPDF and just use the options to point to that custom CSS file.

Here's part of my script file for you to reference, my CSS file is named _pdf_style.css:

var ops = {
  cssPath: '_assets/css/_pdf_style.css',
  remarkable: {
    xhtmlOut: true,
    linkify: true
  }
}

I use a relative path, as you can see, as opposed to an absolute path like you defined, though that shouldn't cause any issues as long as you are running it from your local environment.

from markdown-pdf.

marcosdiasdev avatar marcosdiasdev commented on May 22, 2024

@ckreon It still doesn't work. I worked it out with Gitbook + Calibre. I recommend it! Anyway, thank you for the support.

from markdown-pdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.