billryan / algorithm-exercise

Data Structure and Algorithm notes. 数据结构与算法/leetcode/lintcode题解/
https://algorithm.yuanbin.me
3.44k stars 892 forks source link

add shared-files for Multilingual #77

Closed billryan closed 8 years ago

billryan commented 8 years ago

Gitbook do not render the files outside language folders now, a workaround for this issue is found in https://github.com/GitbookIO/gitbook/issues/744.

Now you can refer an image or docs like this:

![Queen](../../shared-files/images/8-queens.png)

The workaround is broken for EPUB/PDF/MOBI, replace with

![Queen](https://raw.githubusercontent.com/billryan/algorithm-exercise/master/shared-files/images/8-queens.png)
billryan commented 8 years ago

This feature is fixed in https://github.com/GitbookIO/gitbook/pull/1109. We can use _assets folder for shared files among multiple language sites now. ==> https://github.com/GitbookIO/gitbook/blob/master/lib/output/website.js#L159

            // Copy assets only if exists (don't fail otherwise)
            var assetFolder = path.join(folder, '_assets', that.name);
billryan commented 8 years ago

Fixed in 1c8fd5ce436d2233b3c3ef56dfcb4b35ce3e0205