gohugoio / hugo

The world’s fastest framework for building websites.
https://gohugo.io
Apache License 2.0
74.85k stars 7.47k forks source link

Add Gitbook support #1036

Closed bep closed 6 years ago

bep commented 9 years ago

Not sure if Gitbook is even a term, but it's used here:

https://github.com/astaxie/build-web-application-with-golang

It would be cool to take the above Git repo (and similar) and be able to render a nice multilanguage Hugo site from it.

I will have to think about it, but:

anthonyfok commented 9 years ago

Neat idea, @bep!

Some backgrounder:

It turns out that GitBook is both the name of an open-source NodeJS-based generator (https://github.com/GitbookIO) and a freemium service (https://www.gitbook.com/) for hosting such books.

For example, @astaxie’s books, generated with GitBook 1.5.0, are hosted here:

On my Ubuntu, after installing the GitBook CLI with npm install -g gitbook-cli, I was then able to get the books to build using gitbook build, at least the English and French versions. (The Chinese version contains CRLF-terminated lines which seems to confuse the latest GitBook 2.0.1, causing the sample Go template code to be passed on to nunjucks template engine and causing errors, but I am sure that GitBook's authors will deal with that shortly.)

Anyhow, backgrounder aside, I think @astaxie’s book is a great example candidate for Hugo to support, especially when his book does not use any nunjucks templates. (Not that I know of anyway, haha!)

Just my 2 cents. :smile:

zhe commented 9 years ago

It would be very nice. :+1:

digitalcraftsman commented 9 years ago

@bep All links and paths to files (like images) are relative as far as I've seen it in the book's source code. But I see one problem: how does the converter could differentiate between content folders and those that contain source code examples or assets like the linked images.

bep commented 7 years ago

This issue has been automatically marked as stale because it has not been commented on for at least six months.

The resources of the Hugo team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on 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.

This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.