billryan / algorithm-exercise

Data Structure and Algorithm notes. 数据结构与算法/leetcode/lintcode题解/

Home Page:https://algorithm.yuanbin.me

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

add shared-files for Multilingual

billryan opened this issue · comments

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)

This feature is fixed in GitbookIO/gitbook#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);

Fixed in 1c8fd5c