Hugo: Generate concatenated document for Kindle/PDF generation

Created on 17 Aug 2015  Â·  9Comments  Â·  Source: gohugoio/hugo

We use docker at work. I've looked at 2 Docker documentation repos:

https://github.com/docker/docker
https://github.com/docker/docs-base

I see here:

https://github.com/docker/docs-base/blob/master/config.toml

That Hugo is not only doing generation, but also linking between article/doc sections. I wonder how hard it'd be for you guys to add a "single-doc" generation, so that from the Hugo docs I could generate single .md file with all the sections rendered in the correct order?

Enhancement

Most helpful comment

I'd love for every blogpost to have a "download as PDF" option. Most of my posts are content for oldschool roleplaying games, which means that most of my posts would best be served as printable resources.

All 9 comments

There are similar issues about rendering custom content-types (JSON, iCal ... do a search in this repo and you will find). This will happen, but someone have to do it ...

This could easily extend to your use case, I guess:

  • It would involve creating one or more templates for your content-type
  • For raw markddown Hugo already exposes the RawContent on Page -- ready to be concatenated.

But as I said, someone would have to "build this".

Note/Update: This issue is marked as stale, and I may have said something earlier about "opening a thread on the discussion forum". Please don't.

If this is a bug and you can still reproduce this error on the latest release or the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.

I would like to jump in and share my opinion that this would be a relevant feature for Hugo. My usage for Hugo is twofold: 1) write software documentation and 2) write personal notes and project ideas that are then shared with others. In both, at some point in time, I need to get the web page exported to PDF to be made available for offline usage.

Having a hugo export functionality that would generate a latex and then a PDF automatically would be immensely useful for me. Pandoc (http://pandoc.org/) would probably be of use here.

With the recent change of custom output formats would this actually be in reach aka an output format being pdf? This would be quite awesome.

I don't know why native md-to-pdf support would be part of Hugo Core @stp-ip, but since custom outputs write to any text-based format, what you're really talking about is LaTeX:

http://www.latextemplates.com/latex-for-beginners

Do you think this issue can be closed @bep? Now that shortcodes are supported in multiple outputs (e.g., to create links within a single document like the example given above), it seems like this feature is doable.

I'd love for every blogpost to have a "download as PDF" option. Most of my posts are content for oldschool roleplaying games, which means that most of my posts would best be served as printable resources.

I am using Hugo in localhost and trying to export my single page as PDF. When i ctrl+p on a page and select a pdf printer it renders all the page with the menus. can anybody solve this?

@bugrakeskin. I hesitate to put responses to a closed issue, but PDF output is a matter of your print stylesheet and not related to Hugo:

https://www.smashingmagazine.com/2018/05/print-stylesheets-in-2018/

Hi Ryan,

thank you so much.. i am not a developer so i have limited knowledge about
this. I just want Hugo to add built in export to PDF support.. but i will
read and try to add code to my .css..

Good Day

Ryan Watters notifications@github.com, 23 Oca 2020 Per, 19:49 tarihinde
şunu yazdı:

@bugrakeskin https://github.com/bugrakeskin. I hesitate to put
responses to a closed issue, but PDF output is a matter of your print
stylesheet and not related to Hugo:

https://www.smashingmagazine.com/2018/05/print-stylesheets-in-2018/

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/gohugoio/hugo/issues/1360?email_source=notifications&email_token=AN7H3SR6KABS5EJAYXUT3XTQ7HDCBA5CNFSM4BNUQFVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJYAZGI#issuecomment-577768601,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AN7H3SVSMNBCQTSKNOCG66DQ7HDCBANCNFSM4BNUQFVA
.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

arikroc picture arikroc  Â·  3Comments

geddski picture geddski  Â·  3Comments

tjamet picture tjamet  Â·  3Comments

MunifTanjim picture MunifTanjim  Â·  3Comments

bep picture bep  Â·  3Comments