Live data from Hacker News

MdBook – A command line tool to create books with Markdown

rust-lang.github.io

11–20 of 123 posts

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

#11

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.

Eh, in this case it's a tool created by Rust programmers for generating documentation for the Rust language, and has particular features for validation of Rust code snippets in said documentation. I think in this case, mentioning Rust in the description is reasonable.

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

#12
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

I don't think it is zealotry. They offer features explicitly for Rust programmers, and the major examples of the project's use are by Rust itself.

> Automated testing of Rust code samples

> mdBook is used by the Rust programming language project, and The Rust Programming Language book is another fine example of mdBook in action.

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

#13
post #5

Started using mdBook couple days ago for documenting small project. This is exactly what I need: small static pages generator. Tried HUGO, but it seems so huge and bloated comparing to mdBook. Now I edit doc with Obsidian/VIM, push to Gitea and in minute get public documentation.

I use hugo with the book theme (https://github.com/alex-shpak/hugo-book). It takes a bit of getting used to (if you're not familiar with hugo) but after that it's pretty good with all the flexibility that hugo provides for shortcodes, etc. You can get auto numbering of figures, equations, etc. with appropriate shortcodes. Is it possible to get autonumbering in mdBook?

It also gives a nice toc/tags on the right side (if you want it), and the ability to split the page into columns. The katex support is good (looks like mdBook uses mathjax) and publishing is easy and is just a push/rsync.

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

#14
post #9

Was using mdbook for a lot of projects, but these days, I feel like material for mkdocs just has so much more built in that makes it nice to use. One example, I really like the page TOC on the right side that is notably absent from mdbook, where it seems the standard to set up SUMMARY very detailed and break what could've been a single page into many different files.

Yeah material for mkdocs is so good it's worth slogging through a python install/venv to make it work.

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

#16

I recently started exploring, and slowly migrating, to .mdx over .md for content. So far it’s been a breath of fresh air tbh. My biggest problem of markdown was the specific flavor I happen to be using and the type of cliffs I’d run into, then how to extend them. I’m extremely satisfied with 80-90% of the standard Gitbook markdown flavor. Then every now and then I really wanna make a complicated table, or a code bloc…

> My biggest problem of markdown was the specific flavor I happen to be using and the type of cliffs I’d run into, then how to extend them.

First time I heard of .mdx and looked up the site [0]. I am insufficiently in the loop of frontend standardization. Now it would be great to get rid of flavors and have one universal approach. In the Docs I read:

> MDX is not coupled to React. You can also use it with Preact, Vue, Emotion, Theme UI, etc. Both the classic and automatic JSX runtimes are supported.

A sibling comment already mentions a Svelte implementation [1]. So I fail to see how this doesn't open a pandora's box of yet more flavors, this time coupled to frontend frameworks. First in .mdx and then incompatible with .md

Extensibility. Yes, I guess, if your stack is supported by any of the existing implementations.

[0] https://mdxjs.com/docs/what-is-mdx/

[1] https://mdsvex.com/docs

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

#17
post #9

Was using mdbook for a lot of projects, but these days, I feel like material for mkdocs just has so much more built in that makes it nice to use. One example, I really like the page TOC on the right side that is notably absent from mdbook, where it seems the standard to set up SUMMARY very detailed and break what could've been a single page into many different files.

I been a huge fan of mkdocs for a while now. It really does just get the job done with a minimum of fuss and muss, and has a lotta nice themes to choose from (as well as being fairly easy to customize or build your own).

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

#19
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.

- Antora: For people who want the best docs, and are willing to put in the most effort. It will manage, for you, the process of generating documentation sites that collect documentation from multiple projects and possibly multiple versions of each project. Asciidoc is full of features you’ll find useful.

Hugo looks like it has a lot of flexibility like Jekyll, but it seems to take more effort to get everything working the way you want, and it also seems like there’s just too much variation in how the different themes work. To be honest, I never really managed to make anything with it—I found out that the theme I was using didn’t have some features I wanted, so I switched to a different theme, but it’s not easy to switch themes. I was too frustrated and gave up.

It looks like MdBook is reasonably active, so I’m sure it will catch up.

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

#20
post #9

Was using mdbook for a lot of projects, but these days, I feel like material for mkdocs just has so much more built in that makes it nice to use. One example, I really like the page TOC on the right side that is notably absent from mdbook, where it seems the standard to set up SUMMARY very detailed and break what could've been a single page into many different files.

I use https://github.com/JorelAli/mdBook-pagetoc to get Table of Contents for chapters
Post reply on HN