fauno / jekyll-pandoc-multiple-formats

Use pandoc on jekyll to generate posts in multiple formats. Development has moved to https://0xacab.org/edsl/jekyll-pandoc-multiple-formats
https://endefensadelsl.org
Other
89 stars 28 forks source link

broken pipe? #18

Closed tomjoht closed 9 years ago

tomjoht commented 9 years ago

When I try to run the plugin, I get an error that says jekyll 2.5.3 | Error: Broken pipe.

Also, can you clarify what files from the plugin need to be placed into the jekyll project directory?

Thanks.

fauno commented 9 years ago

do you have pandoc installed and available in PATH?

here's how we use this plugin:

tomjoht commented 9 years ago

thanks for your help. i abandoned the other instructions and just did (more or less) as you indicated above:

  1. added bundler.rb (from what you linked to above) to _plugins directory.
  2. ran bundle init to create gemfile.
  3. opened gemfile and added this:
source 'https://rubygems.org'

gem 'therubyracer'
gem 'jekyll'

group :plugins do
  gem 'jekyll-torrent'
  gem 'jekyll-pandoc-multiple-formats', github: 'fauno/jekyll-pandoc-multiple-formats', branch: 'develop'
end
  1. ran bundle install. all of the needed gems installed.
  2. added this to my config file:
pandoc:
  skip: false
  impose: false
  output: ./tmp
  flags: '--smart --bibliography=ref.bib'
  site_flags: '--toc'
  outputs:
    pdf: '--latex-engine=latex'
    epub:
    markdown:

(note: I wasn't sure if i was supposed to remove my previous markdown: redcarpet property from this file.)

  1. ran jekyll serve

And got this error:

pandoc: Error running filter pandoc-citeproc
pandoc-citeproc: Could not find ref.bib

I wanted to make sure I had Pandoc installed correctly. So I ran pandoc --version. The response was

pandoc 1.13.1 

(plus other details)

In googling the citeproc ref.bib error, I found a thread suggesting something was wrong with the pandoc install. So I uninstalled pandoc using this:

sudo rm -f /usr/local/bin/pandoc /usr/local/doc/pandoc-1.9.4.2 /usr/local/share/man/man1/pandoc.1.gz /usr/local/share/man/man5/pandoc_markdown.5.gz /usr/local/share/pandoc-1.9.4.2

Then ran pandoc --version and which pandoc to confirm no pandoc instances.

Then I reinstalled pandoc. First I installed the Haskell platform. Then ran this to make sure the citeproc utilities were included in the install:

cabal install pandoc pandoc-citeproc

After installation finished (it took a while), I ran

which pandoc-citeproc

The response:

/usr/local/bin/pandoc-citeproc

I then ran jekyll serve and got this error:

      Generating...
  Conversion error: Jekyll::Converters::Markdown encountered an error while converting 'CHANGELOG.md':
                    No such file or directory - pandoc
Generating torrent file at /Users/tjohnson/projects/acme/_site/acme/site.torrent
jekyll 2.5.3 | Error:  No such file or directory - mktorrent

I tried downloading mktorrent, but wasn't sure where to put it. Also, I tried creating site.torrent in the _site directory, but it keep disappearing.

Can you advise me on how to resolve these errors?

Also, can you tell me if this plugin generates a pdf containing all pages in the site (like a giant user guide), or just one pdf per site page? I need the former, not the latter. Thanks.

fauno commented 9 years ago

the ref.bib error is because of the --bibliography=ref.bib flag on your _config.yml. the torrent issue is because of 'jekyll-torrent' on Gemfile. it doesn't currently generate a big pdf of all posts, just a pdf per post. i've tried doing this (a pdf per category) but couldn't find a way using jekyll's current features but i didn't look deeper.

tomjoht commented 9 years ago

thanks for the troubleshooting info. yeah, i actually need a big pdf of all pages on the site. i found a good way to do this using princexml, so i should be good. thanks for your help.