Docusaurus: feature request: local project files in siteConfig.scripts & siteConfig.stylesheets

Created on 8 Apr 2018  路  5Comments  路  Source: facebook/docusaurus

We want to include our library distributable in the pages of our documentation site to demonstrate it. There's also a 3rd-party (vendor) script in the node_modules dir that we need to include (to make the indicated code blocks "executable").

Is there a nice way to include local project files in siteConfig.scripts that are outside the ./website/static/ dir?

Right now I'm copying the needed files into ./website/static/vendor at the beginning of every script (start, build, publish), and adding that dir to .gitignore, but it feels hacky.

I propose we treat relative paths in siteConfig.scripts & siteConfig.stylesheets as relative to the location of siteConfig.js and copy those files into the build.

Would the maintainers welcome a PR to add this?

feature

Most helpful comment

@yangshun I wouldn't mind working on this!

All 5 comments

I think this is a reasonable suggestion. PR welcome!

In future we might want to move to a bundler like webpack, rollup or parcel though.

@yangshun I wouldn't mind working on this!

@Airse Awesome, it's yours!

Has there been any progress on this?

Wontfix in v1 with v2 coming up

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NikitaIT picture NikitaIT  路  3Comments

MoogyG picture MoogyG  路  3Comments

rickyvetter picture rickyvetter  路  3Comments

sebqq picture sebqq  路  3Comments

JoelMarcey picture JoelMarcey  路  3Comments