Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build the PDF version after each deploy #33

Open
sergeyklay opened this issue Jul 17, 2017 · 14 comments
Open

Build the PDF version after each deploy #33

sergeyklay opened this issue Jul 17, 2017 · 14 comments
Assignees
Labels

Comments

@sergeyklay
Copy link
Contributor

No description provided.

@sergeyklay sergeyklay added the nfr label Jul 17, 2017
@ninjapanzer ninjapanzer self-assigned this Aug 24, 2017
@ruudboon
Copy link
Contributor

ruudboon commented Feb 1, 2019

Is this still on our wish list?

@sergeyklay
Copy link
Contributor Author

Well, we did this earlier for older versions and I see no reason because of which we cannot do it now. Probable we should discuss this at Discord.

@niden
Copy link
Contributor

niden commented Feb 2, 2019

Yes we can do this but to do so we need to first build PDF templates. Once that is done it should be easy to generate the file

@ruudboon
Copy link
Contributor

ruudboon commented Feb 4, 2019

@niden What kind of templates do you need?
Isn't this something we can do with pdffiller.com?

@niden
Copy link
Contributor

niden commented Feb 4, 2019

@ruudboon There is a gem that generates PDF files from the Jekyll pages. All it needs is HTML templates that the PDF process will use i.e. not to have the big header and the right sidebar (as our docs site has now).

Then I can start testing this and see how the PDF comes out. I don't think that we need PDFiller for this, at least until we just try that out.

The templates themselves can be very rudimentary, honestly not even have any styling. For now I just want to know how it will render. If that is successful then we can work on making them better/prettier

@niden
Copy link
Contributor

niden commented Feb 4, 2019

https://github.com/abeMedia/jekyll-pdf

This is the library I am looking at. It kind of seems that it is abandoned and there is a "bug" they have with launching it but one of the users has a solution for it. so it will work.

Note how in the readme it mentions about header/footer and cover page templates.

@ruudboon ruudboon self-assigned this Feb 4, 2019
@ruudboon
Copy link
Contributor

ruudboon commented Feb 4, 2019

Ok, will have a look at if @ninjapanzer didn't started it already.

@ninjapanzer
Copy link
Contributor

I am going to do my best to wrap this up today

@ninjapanzer
Copy link
Contributor

ninjapanzer commented Feb 9, 2019

So I see two paths here:

  1. https://github.com/abeMedia/jekyll-pdf -> supports page by page PDFs so this is useful for getting a printable pdf of any page. It is based on WKHTML2PDF which is kinda like imagemagick where each version has its own bugs and features that work differently
  2. https://idratherbewriting.com/documentation-theme-jekyll/mydoc_generating_pdfs.html -> this one is some tooling ontop of prince that generates a full site PDF.

EDIT PRINCE is not an open source product so I am going to keep poking about for a solution

I suspect that 1 is abandonware because the browser does a really good job of this given we have valid Print CSS. That said I am going to follow along with the full site PDF which while it has been a while feels like what we used to do.

The deploy process should be easy to automate. Some buildmachine has to run a script to serve the jekyll site in devmode and then then prince walks the site and produces a pdf.

Are we doing any deploys via docker here? I see a boxfile.yml but I am unsure what is using that.

@niden
Copy link
Contributor

niden commented Feb 10, 2019

@ninjapanzer The boxfile.yml is there if you want to run the docs locally. When something gets pushed to the docs-app repository, netlify gets notifified and starts building the site. Once the build is complete it is deployed as live.

From what I understood reading regarding the jekyll-pdf if you will need templates for your PDF version (pdf_*.html) potentially stripped of from the unnecessary stuff such as the sidebar for instance and just print one page after another to produce the PDF file. Then the file is ready to be downloaded.

@ninjapanzer
Copy link
Contributor

@niden are you looking to have 1 pdf file for each version and language or one per rendered page?

I figure the goal isn’t to get an offline copy of the docs in whole

@niden
Copy link
Contributor

niden commented Feb 10, 2019

I was looking for one PDF file for English (everything in there) and one per other language. So you have the whole docs as one

@ninjapanzer
Copy link
Contributor

Ok thats the direction I am going, I am taking https://github.com/abeMedia/jekyll-pdf as a pattern and writing a new gem that will using the existing site metadata to generate the pdfs in various combinations.

So if jekyll-pdf would have worked so will this.

@ruudboon ruudboon removed their assignment Sep 4, 2019
@ruudboon
Copy link
Contributor

ruudboon commented Sep 4, 2019

@ninjapanzer Is this something you're still working on?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants