honkit / honkit

:book: HonKit is building beautiful books using Markdown - Fork of GitBook

Home Page:https://honkit.netlify.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Plugin's resources for a multilingual book overridden unexpectedly

kakkun61 opened this issue · comments

Summary

When a plugin give different resources for each language book on a multilingual book, only one set of resources is copied to _book, instead of all sets of ones.

  • HonKit version: 3.7.4

Step to reproduce

  1. Prepare a multilingual book
  2. Use a plugin that returns different resources for each language book
    • In this example “gitbook-plugin-add-js-css” is used
  3. Only last (?) resources are copied in a _book directory

Expected results

_book/gitbook/gitbook-plugin-add-js-css directory has three CSS files.

  • (hashed)-style.css (contains .root { --foo: black; })
  • (hashed)-style.css (contains .root { --foo: green; })
  • (hashed)-style.css (contains .root { --foo: red; })

Actual results

_book/gitbook/gitbook-plugin-add-js-css directory has only one CSS file.

  • 8475660b37f194a88de481bf6c110409-style.css (contains .root { --foo: black; })
commented

I agree that this is an odd behavior.

We would need to investigate whether this is a core or plugin issue.