News for hackers. Stuff that matters.
Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by quickthrower2 on Tuesday March 17, 2020 @06:48AM (#22603611)
You can also make a serverless ebook from any web page by clicking print to pdf
Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by JeremyNT on Tuesday March 17, 2020 @11:24AM (#22605730)
The reading experience for PDFs on most devices is really poor, and most sites aren't designed with printing in mind to begin with, making it even worse. Standard ebook formats tend to work a lot better.

This post seems specifically to be about rendering your documentation both as html and also as an ebook, which is something I can definitely get behind. The experience of having a structured ebook instead of HTML is really valuable especially when doing things like learning programming languages, where precise formatting tends to really be important for legibility. I recently encountered this when perusing Rust's online books, some of which did not seem to have ebook equivalents.

Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by numlock86 on Tuesday March 17, 2020 @08:32AM (#22604227)
Shhh, if that gets viral politics might ban print to PDF because of some weird misconceptions regarding copyrights ...
Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by prepend on Tuesday March 17, 2020 @05:20AM (#22603121)
This is a nice tutorial, but I’m a little sour on gitbook because their project really pushes their service, that seems really expensive to me.
Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by praveenweb on Tuesday March 17, 2020 @07:26AM (#22603784)
In case you are looking only for a web app you can check out this open source starter - https://github.com/hasura/gatsby-gitbook-starter (Made using Gatsby and MDX).

You can write markdown with added benefits of React components and this Gatsby starter will render a GitBook theme documentation site. Self host using Docker or build the static bundle and deploy to Netlify :)

Disclaimer: I maintain this starter.

Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by adz_6891 on Tuesday March 17, 2020 @07:53AM (#22603969)
This is really nice. Great work!
Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by sovietmudkipz on Tuesday March 17, 2020 @08:37AM (#22604271)
I’m really upset they stopped working gitbook as an open source project in favor of locking in folks to using their service which runs hidden, proprietary software.

The open source repo still exists but it’s abandoned.

I wish they could have found a path to money without destroying their open source offering.

Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by olah_1 on Tuesday March 17, 2020 @09:28AM (#22604669)
And because their legacy service had more features (like multiple languages)...

Docsify needs maintainers btw. It's a worthwhile project! https://github.com/docsifyjs/docsify

Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by karlicoss on Tuesday March 17, 2020 @12:07PM (#22606320)
mdbook (https://github.com/rust-lang/mdBook) is open source, and I think it's very similar to gitbook in functionality
Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by james-skemp on Tuesday March 17, 2020 @05:45PM (#22610808)
It's extremely similar, and even looks better out of the box, IMO.

When gitbook moved (rather poorly - there was a lot of confusion on what would happen to the old codebase) to a service, mdbook is what I switched over to, and I'm glad I had been forced to look for an alternative to gitbook.

Haven't really done anything with Rust, but having been bitten once, my research suggested they'd be unlikely to drop mdbook anytime soon.

Edit: example GitLab-hosted book: https://gitlab.com/strivinglife/book-git-commands

Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by nathancahill on Tuesday March 17, 2020 @09:52AM (#22604839)
Same. The open source version was excellent, but they abandoned it in favor of the hosted, closed version. I tried for a long time to get it running as a self-hosted service but could not.
Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by maheso_suro on Tuesday March 17, 2020 @06:41AM (#22603588)
i used to write ebook in gitbook but not anymore. yeah it's pretty sad that gitbook is going in that way.
Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by montenegrohugo on Tuesday March 17, 2020 @06:50AM (#22603621)
What do you mean by this? I see they offer 10 workspaces for free [1], isn't that pretty good? What are they limiting/paywalling that you'd consider 'essential'?

[1] https://www.gitbook.com/pricing

Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by prepend on Tuesday March 17, 2020 @04:46PM (#22610208)
I don’t want a free “workspace.” I want to generate my files and host myself.

One of the main things I like about static site generators is that they are so simple to host.

-Brian

Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by lqs469 on Tuesday March 17, 2020 @05:40AM (#22603224)
It's a nice tutorial about Github action and Gitbook. But this has little to do with the Serverless. Or just "Server less".
Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by codemusings on Tuesday March 17, 2020 @11:27AM (#22605770)
Serverless has to be the dumbest term in the tech industry.
Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by jedberg on Tuesday March 17, 2020 @01:17PM (#22607302)
It's not great, but I haven't heard a decent replacement yet. One that captures "you don't have to manage servers or infrastructure" in a single word.
Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by tracker1 on Tuesday March 17, 2020 @07:28PM (#22611791)
"Easy Button Hosting" ... "that was easy."

Though Office Max (or was it Office Depot) may sue.

Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by ahartmetz on Tuesday March 17, 2020 @06:58PM (#22611534)
"Stateless" is closer to the truth than "serverless".
Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by jedberg on Wednesday March 18, 2020 @12:17AM (#22613581)
Not really though. There is plenty of state. Configure files, databases, blob storage. These are all part of the serverless ecosystem.
Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by ahartmetz on Friday March 20, 2020 @03:15PM (#22640634)
There are plenty of servers as well!
Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by wjdp on Tuesday March 17, 2020 @07:14AM (#22603720)
No writeup, but have published a 'serverless' Kindle dictionary using a similar method. This is for reading the Game of Thrones books to improve the x-ray feature. Instead of Gitbook it's just a Jekyll site with some Liquid templates to generate the files needed for Amazon's kindlegen program. Builds happen in Travis and it's hosted on Pages.

- https://github.com/wjdp/gotdict - https://gotdict.wjdp.uk/

Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by Finnucane on Tuesday March 17, 2020 @09:21AM (#22604612)
Isn't a serverless ebook just an ebook?
Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by ASalazarMX on Tuesday March 17, 2020 @12:52PM (#22606956)
Nooo, because the server would be your reader! What kind of primitive stack are you promoting?
Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by innocenat on Tuesday March 17, 2020 @05:42AM (#22603242)
How do I have Serverful eBook?
Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by BossingAround on Tuesday March 17, 2020 @06:27AM (#22603528)
O'Reilly subscription, probably?

Turn the book into HTML, serve the HTML on demand and BAM, Book as a Service!

Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by retonom on Tuesday March 17, 2020 @05:23AM (#22603139)
how in the world is this serverless?
Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by ahartmetz on Tuesday March 17, 2020 @06:58AM (#22603660)
It's a way to let you know that it's trendy and interesting. /s
Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by codegladiator on Tuesday March 17, 2020 @06:12AM (#22603426)
It's not your server.
Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by dejj on Tuesday March 17, 2020 @07:52AM (#22603960)
"Serverless" is the new "Cloud"
Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by collyw on Tuesday March 17, 2020 @08:24AM (#22604180)
and "Cloud" is the new "Web"
Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by eeZah7Ux on Tuesday March 17, 2020 @09:01AM (#22604455)
It's on a server and you have less control over it.
Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by manigandham on Tuesday March 17, 2020 @06:40AM (#22603583)
It uses managed services for building and hosting.
Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by marvindanig on Tuesday March 17, 2020 @04:55AM (#22603005)
That's a cool website. Book != [website, file, blog] though.
Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by crooked-v on Tuesday March 17, 2020 @05:05AM (#22603050)
> and it will not deploy only the web version, but the ebook files as well (in .pdf, .epub, and .mobi format).
Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by marvindanig on Tuesday March 17, 2020 @05:10AM (#22603074)
i know. that is great! but all of those options are file formats. books != files. books are cool, files are ugly. which is also why 99 of 100 people still prefer to buy the dead tree books over tech jazz called files.
Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by input_sh on Tuesday March 17, 2020 @05:17AM (#22603112)
What a weird hill to die on. Books are long written compositions, their format (whether it's on dead trees, computer, or spoken out) is completely irrelevant.
Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by anujrajput on Tuesday March 17, 2020 @12:41PM (#22606800)
Abstract weird hill. Book, irrespective of the medium, should provide information in an ordered fashion. Printing words and pictures on paper was one of the many ways to express what the book author wanted to say in the times when screens were not invented. The purpose of books was to communicate a thought, philosophy or a concept. If that can be done using technology without harming any trees, sign me up. Books are books, irrespective of the medium they are delivered on.
Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by marvindanig on Tuesday March 17, 2020 @05:31AM (#22603183)
it always sounds weird until it isn’t. the container is the most important characteristics of a book. to pass it off as irrelevant is not only intellectually dishonest but also just plain wrong.
Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by tasogare on Tuesday March 17, 2020 @05:55AM (#22603320)
No, it's not. Some of the oldest books are written on bamboo stripes, and others on clay tablets.
Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by marvindanig on Tuesday March 17, 2020 @06:01AM (#22603357)
> Some of the oldest books are written on bamboo stripes, and others on clay tablets.

exactly. there used to be physical scrolls too before the romans invented the paginated codex. all of those older tech died later because it was hard to beat direct access, referential accessibility and format-ability of the modern physical codex book. our current tech emulates the physical scroll too and is therefore not able to compete with dead tree books.

Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by Cederfjard on Tuesday March 17, 2020 @07:30AM (#22603808)
Merriam Webster:

  book noun
  \ ˈbu̇k  \
  
  Definition of book (Entry 1 of 3)
  1a: a set of written sheets of skin or paper or tablets of wood or ivory
  b: a set of written, printed, or blank sheets bound together between a front and back cover
  an address book
  c: a long written or printed literary composition
  reading a good book
  reference books
  hardcover and paperback books
  d: a major division of a treatise or literary work
  the books of the Bible
  eaccounting : a record of a business's financial transactions or financial condition —often used in plural
  the books show a profit
  f: MAGAZINE sense 1a
  g: E-BOOK

  [...]
Cambridge Dictionary:

  book
  noun
  UK  /bʊk/ US  /bʊk/
   
  A1 [ C ]
  a written text that can be published in printed or electronic form:
  
  [...]
You're entitled to have your own rigid definition if you wish, but it's pretty silly to go in a public forum and try to browbeat others with it.
Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by moron4hire on Tuesday March 17, 2020 @07:53AM (#22603971)
I would say he is not entitled to any such thing, as he doesn't own the language.
Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by marvindanig on Tuesday March 17, 2020 @10:29AM (#22605109)
Ah, the overflowing privilege of handing out entitlements? Your brethren doesn’t own the language either, you know that right?
Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by jshevek on Tuesday March 17, 2020 @10:43AM (#22605242)
The situation is in no way symmetric, as only one party is claiming a non-standard limitation on valid uses of the language. The other parties are claiming both a standard and more permissive use.
Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by marvindanig on Tuesday March 17, 2020 @10:56AM (#22605417)
This is a classic flat earth argument.

‘Because people are saying so...’

Proper definition is the only definition that there is. Improper definitions may be valid uses in colloquial speak, but that doesn’t work for accurate description of products at hand. Success of physical books, as in the data, is a proof of proper usage. I rest my case. Time to go back to work.

Edit: Response to the child comment below:

You're going in the wrong direction.

That 'books are not files' is a plain fact. It has nothing to do with popular opinion or liberal usage of words. Although, if you were to look at it liberally through the lens of popular usage alone then also the usage and growth of dead tree books over the shallow market of files masquerading as ebooks will reveal the same plain fact.

Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by jshevek on Tuesday March 17, 2020 @11:53AM (#22606111)
>This is a classic flat earth argument. ‘Because people are saying so...’

No. Again you reason by false equivalence. The shape of the earth is not determined by popular opinion. The meaning of words is determined by popular usage.

Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by marvindanig on Tuesday March 17, 2020 @10:19AM (#22605033)
Wikipedia:

‘A book is a set of printed sheets of paper held together between two covers.’

I’d say going by definitions on Merriam Webster and others shared by you + real data it is safe to err on the side of proper definition. And HN complaining about browbeating? I mean come on. :)

Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by jshevek on Tuesday March 17, 2020 @12:28PM (#22606616)
To extract that, you had to go farther down the same page than this:

>Book medium for a collection of words and/or pictures to represent knowledge or a fictional story, often manifested in bound paper and ink, or in e-books

Re:Serverless eBook Using Gitbook, GitHub Pages, GitHub Acti... by thanatropism on Tuesday March 17, 2020 @08:08AM (#22604072)
My wife is a managing editor (and used to be a hands-on-board) editor.

Books are edited.

There's a great book in the archives of Joel on Software (maybe he's even had it done); possibly two or N -- but that requires filtering. And then combing and rewriting/patching not to depend on links anymore (so it makes sense like five years from now, dig?), nor on an ongoing blog narrative. Then understanding the major themes to consolidate multiple blog posts in chapters.

I don't know that this has been done with a blog, but yes from lecture notes and slides, etc. Usually the writer has to come up with text (or hire a ghost writer); most of the time, he edits his work to some extent. But manuscripts never arrive ready for print.

You can see this in Lulu "books". I own Nobel Prize-winner Vernon Smith's autobiography published by a vanity press and holy hell what a mess.