Live data from Hacker News

MdBook – A command line tool to create books with Markdown

rust-lang.github.io

21–30 of 123 posts

Re: MdBook – A command line tool to create books with Markdown

#21
post #4

Way to bury the lede. Like gitbook but Free. The rust zealotry put me right off fwiw. As it does my interest in the language itself. I wish those guys would calm down they're totally detracting from whatever the strengths of rust are with that nonsense. edit: gitbook pricing for comparison https://www.gitbook.com/pricing

What zealotry? Rust isn't mentioned until the last two points of eight:

mdBook is a command line tool to create books with Markdown. It is ideal for creating product or API documentation, tutorials, course materials or anything that requires a clean, easily navigable and customizable presentation.

- Lightweight Markdown syntax helps you focus more on your content - Integrated search support - Color syntax highlighting for code blocks for many different languages - Theme files allow customizing the formatting of the output - Preprocessors can provide extensions for custom syntax and modifying content - Backends can render the output to multiple formats - Written in Rust for speed, safety, and simplicity - Automated testing of Rust code samples

It mentions Rust because it's written in Rust and used by the Rust project.

In other words, the project wouldn't exist without Rust but

Re: MdBook – A command line tool to create books with Markdown

#22

Me: Are we past "x but in Rust" where Rust is a totally irrelevant internal detail I don't — nor should anyone — care about? [Checks HN]: Nope.

It matters in that it helps people contribute, which contributes to growth.

Oh. and it's free.

Re: MdBook – A command line tool to create books with Markdown

#23
post #10

For producing online documentation, how does this compare to MkDocs?

Embarrisngly, I'm using both for docs at work (they were both projects I started).

Mkdocs is more flexible, has more themes, better ecosystem. Mdbook has better defaults, easier deployment, is more standard across rust projects

Re: MdBook – A command line tool to create books with Markdown

#24
I found mdBook easy to use, especially like that users can choose themes. I primarily use it for online version of my ebooks [0] and curated resources [1][2]

[0] https://github.com/learnbyexample/scripting_course#ebooks

[1] https://learnbyexample.github.io/py_resources/

[2] https://learnbyexample.github.io/curated_resources/

Re: MdBook – A command line tool to create books with Markdown

#25
I used to use gitbook to generate til.secretGeek.net but it got slower and slower over time, would take 45 mins to build the site… and then the parts I was using were either deprecated or made “premium” - something happened. The “enshittification” set in, basically. If there’s some nice free thing you use that’s too good to be true… wait a few years it will go to muck.

I bit the bullet and wrote my own very minimal static site generator in .net, so the site builds in a few seconds again. Note that I’m not spruiking it for others to use… because if it became popular, no doubt I’d end up enshittifying it too.

Re: MdBook – A command line tool to create books with Markdown

#26

Me: Are we past "x but in Rust" where Rust is a totally irrelevant internal detail I don't — nor should anyone — care about? [Checks HN]: Nope.

Well, if it is implemented in Rust, then who cares whether it works or not? It's implemented in Rust!

Re: MdBook – A command line tool to create books with Markdown

#27
post #10

For producing online documentation, how does this compare to MkDocs?

I’ve used both, I recommend MkDocs over MdBook for most people. MdBook is simpler and easier to get started with, MkDocs has more features, more plugins, more themes. Both MkDocs and MdBook are easy to use. IMO, MdBook is a little too simple.

Recommend using the material design theme for MkDocs as a starting point. If you are working on a Rust project, use MdBook instead. If you have lots of docs / multiple projects / multiple versions, use Antora. If you want cooler landing pages, use Jekyll.

Re: MdBook – A command line tool to create books with Markdown

#28

I’ve tried MdBook, Jekyll, and MkDocs. MdBook is slick for basic projects, but I felt it was too minimalistic for me. When I dug into the source for the MdBook sites that I liked, I saw that they had extended MdBook with some custom Rust code. My recommendations are: - MkDocs: Good default choice, reasonably flexible. - Jekyll: For people who want a little more flexibility—things like landing pages, blogs, etc. - Ant…

I am a long time Jekyll user and I still think it's a great tool for blogs, but by far the best SSG for documentation websites I have found is Docusaurus. (https://docusaurus.io/)

I resisted trying it for the longest time because I didn't want a JavaScript based tool, but I am glad I caved. It's so easy to get started, crazy fast, and the sites are absolutely beautiful out of the box yet easy to customize. The mdx support is awesome too.

Re: MdBook – A command line tool to create books with Markdown

#29

I’ve tried MdBook, Jekyll, and MkDocs. MdBook is slick for basic projects, but I felt it was too minimalistic for me. When I dug into the source for the MdBook sites that I liked, I saw that they had extended MdBook with some custom Rust code. My recommendations are: - MkDocs: Good default choice, reasonably flexible. - Jekyll: For people who want a little more flexibility—things like landing pages, blogs, etc. - Ant…

Wow, what is up with the material mkdocs theme (https://squidfunk.github.io/mkdocs-material/)? That's an extremely spiffy landing page, especially given that it's for a theme designed for a totally separate piece of software.

Re: MdBook – A command line tool to create books with Markdown

#30
I've written an online book with mdbook (https://lhbg-book.link) and it was a breeze. I believe mdbook was one of the reasons I even finished the book.

1. It's super easy to install. If you have a rust toolchain, just `cargo install mdbook`

2. One command to initialize: `mdbook init my-book`

3. One command to get immediate continuous feedback: `mdbook serve`

4. It allowed me to keep writing in my preferred environment (emacs)

5. It looked good by default. I could focus on the content.

6. Setting up auto deploy ci on github is about 30 lines for yaml

Though one point of improvement would be better support for other export formats such as pdf and epub.

tl;dr mdbook allowed me to use the path of least resistence to complete my project, and I highly recommend it.

Also it is possible other platforms can do the same or better but I haven't tried them.

Post reply on HN