Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upEnable all trusted committers to produce an ebook of proven patterns #173
Comments
|
@dicortazar I would be really curious to hear your opinion about the challenges and proposal above, as you have all the working knowledge from producing the gitbook so far. |
|
Some other relevant links if we want to use pandoc for this: |
|
Thanks for the write-up @spier!
Here's something more, German language though
And matching Docker images (or their source repos) we can hopefully build upon: One commercial service rendering books from markup: |
|
So many options :) Great to know that pandoc can also do epub. I will try to find something that can use a GitHub Action to build both a PDF and an epub. Let's see :) |
If there isn't any GitHub action will actually happily run any Docker container or even blank shell scripts. |
|
Another example of a gitbook produced from a github repo: |
|
Btw I am starting to look into gitbooks today. If there is any gitbooks expert that sees this here and wants to help, let me know :) |
Sounds great, @dicortazar already has a bit of GitBook experience. Looking forward to see a WIP PR for it so others can join in. Could you try to push that to a different branch than Found this GitHub Action that might be useful for it: https://github.com/marketplace/actions/gitbook-action I also took a look at the OWASP example, that's a great find!
|
|
Yep, I am already working on a branch For now I am shooting for a gitbook only (that will also provide a PDF download). It looks like I can create that directly with the GitHub integration available in gitbook, but maybe that GitHub Actions offers more flexibility. We can check that. I will share what I have once I have learned a bit more about it. Latest next week. |
|
In an effort to release early and often, here a first experiment: It is based of this branch: I will send a PR later and summarize what I have tried, and how this book works right now. |
|
Looks good to me. I think I'll give the Pandoc magic of OWASP a go once I find a bit of time. I should give us a bit more flexibility when it comes to nice, book-style rendering. Looking forward to the PR. Feel free to also just open up a WIP-PR if you like. |
|
Indeed it looks like gitbook offers very few layouting options. Since they moved their service away from their CLI approach and exclusively to a SaaS offering on gitbook.com they have greatly reduce the amount of configuration options for their service. I am still a bit unsure if the pandoc approach will be sustainable for us, assuming that it will be more complex to setup and maintain (and we have very few maintainers right now :)). One option could be to do run with the gitbook approach for a little while, which helps us to create the missing guidelines for level 2 and 3. If we then realize that the content is good but the format isn't pretty enough, we could still look at the pandoc approach in addition to gitbook (or maybe even as a replacement). Will push a WIP PR now. |
Great thanks for the insight! Can you point to some point of their docs detailing the options/restrictions around PDF layout they provide?
It's not more complex than what we already use to render the learning path, effectively supported by a large OSS organization and highly popular, proven software.
Both approaches are entirely independent. Gitbook is fine for pretty online rendering and apparently some PDF rendering until we have something better. If this double approach works for OWASP, it works for us, especially since we can pretty much copy their approach.
Great, thanks. |
So the formatting options for text and images can be found here: It's pretty basic stuff that is mostly also available when formatting content in markdown. I have not seen any specific formatting options for the PDF output actually. gitbook just offers an "Export as PDF" option and that seems to be it. |
Our mission statement says:
@dicortazar has produced an updated gitbook in April 2020. This is an interactive (clickable) version of our patterns: https://dicortazar.gitbook.io/inner-source-patterns/
Possible Challenges (with the current approach)
Proposed Solution
Tech
@MaineC shared how to generate a simple PDF using pandoc. The pattern
.mdfiles are listed explicitly to guarantee a certain order.Looks like this could be further automated e.g. using pandoc-action-example
References