Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

book is not truly offline #463

Open
steveklabnik opened this issue Oct 5, 2017 · 6 comments
Open

book is not truly offline #463

steveklabnik opened this issue Oct 5, 2017 · 6 comments
Labels
A-CDN Area: Hosted dependencies A-HTML Area: HTML Rendering A-Performance Area: Zoom Zoom C-papercut Category: A small usability bug M-Discussion Meta: Discussion

Comments

@steveklabnik
Copy link
Member

Originally filed as rust-lang/rust#44826

It'd be good to have a 100% offline mode for the local docs. We used to do this; I'm assuming some stuff sneaked in!

@azerupi
Copy link
Contributor

azerupi commented Oct 5, 2017

There have been a lot of different issues with the CDN related code. I am beginning to think we should remove it altogether. Loading everything from local sources would solve this issue.

@azerupi azerupi added A-HTML Area: HTML Rendering A-Performance Area: Zoom Zoom M-Discussion Meta: Discussion C-papercut Category: A small usability bug labels Oct 5, 2017
@Michael-F-Bryan
Copy link
Contributor

Would it be better to vendor all required static assets and have them embedded in the mdbook binary? Then whenever we want to change/update an asset, it'll be added to the themes/ directory with a corresponding include_bytes().

@jacwah
Copy link
Contributor

jacwah commented Oct 9, 2017

Vendoring js assets through include_bytes! would be easier if we first concatenate them to a single file. This could be done through a build step similar to regen css.

cat src/theme/*.js > src/theme/vendor.js

Then there's only a single file to vendor. This would probably improve performance as well, since fewer http requests are made from the browser.

@Michael-F-Bryan
Copy link
Contributor

Vendoring js assets through include_bytes! would be easier if we first concatenate them to a single file

I'm not sure how well this would work out. We currently allow people to override various CSS/JS files if they are present in a src/themes/ directory. If the vendored versions were all concatenated together then I don't know how easy it'd be to split them apart again to exclude one or two that the user has overridden.

@jacwah
Copy link
Contributor

jacwah commented Oct 9, 2017

We currently allow people to override various CSS/JS files if they are present in a src/themes/ directory.

Oh, right. I was unaware of that.

@cetra3 cetra3 mentioned this issue Nov 8, 2017
@ehuss ehuss added the A-CDN Area: Hosted dependencies label May 17, 2019
@sanmai-NL
Copy link

@steveklabnik Can this be closed in favor of #546?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CDN Area: Hosted dependencies A-HTML Area: HTML Rendering A-Performance Area: Zoom Zoom C-papercut Category: A small usability bug M-Discussion Meta: Discussion
Projects
None yet
Development

No branches or pull requests

6 participants