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

Offline documentation #22580

Closed
imatmati opened this issue Mar 4, 2018 · 13 comments
Closed

Offline documentation #22580

imatmati opened this issue Mar 4, 2018 · 13 comments
Labels
feature Issue that requests a new feature
Projects
Milestone

Comments

@imatmati
Copy link

imatmati commented Mar 4, 2018

Hi,

Could you please make an offline documentation in a format like PDF or HTML ?
I don't undestand why everyone out there seems to consider normal to make a documentation site with JS that you can't download to read offline. Do I really need a net connection just to read the doc or did I miss something ?
Have a nice day.

@ericmartinezr
Copy link
Contributor

#19459

@imatmati
Copy link
Author

imatmati commented Mar 4, 2018

Hi,
Thanks for your reference. Unfortunately,I noticed it was closed.
Too bad, because it would be really a plus. For instance, how am I supposed to read the docs on my android tablet in my train. Developers are more or less nomads but a web connection is not always possible. The pity is that I was able to mirror the VueJS site but not Angular's one.

@sarunint
Copy link
Contributor

sarunint commented Mar 5, 2018

Thanks to Service Worker, Angular's website works offline!

@imatmati
Copy link
Author

imatmati commented Mar 5, 2018

Offline but with the need of a service worker. You still need a connection and a platform running a server ... So I would not say offline, because you still need a line even local.
Is it really the new norm to access documentation throw a server ?

@gkalpak
Copy link
Member

gkalpak commented Mar 5, 2018

The pity is that I was able to mirror the VueJS site but not Angular's one.

Why is that? What problems did you run into, @imatmati?

You still need a connection and a platform running a server

Not sure what you mean about needing a server. ServiceWorkers run in the browser and are able to handle requests, thus enabling an app to work as if online even when there is no network conectivity (assuming that the ServiceWorker has previously cached the necessary data - in our case docs content).

At the moment we are not caching the content of all docs (guides, API docs, etc), but only the top-level ones. We will soon switch to the latest @angular/service-worker (you can follow progress in #19795), which offers better/more flexible caching capabilities, including dynamic caching.

Once it's done, we could consider adding a way to cache all documents offline, but it is not in our top priorities. (We would happily accept contributions, I guess, if anyone is interested in investigating that.)

@gkalpak gkalpak added feature Issue that requests a new feature comp: aio labels Mar 5, 2018
@ngbot ngbot bot added this to the Backlog milestone Mar 5, 2018
@sarunint
Copy link
Contributor

sarunint commented Mar 5, 2018

You'll need to be online for the first time only. After that, you can access it offline.

Moreover, if there is a documentation update, it'll update automatically.

@imatmati
Copy link
Author

imatmati commented Mar 5, 2018

Hi,

Thanks for your replies. AFAIK, I can't rely totally on the cache of my browser. I don't remember where, but I read something about that in an attempt to read the docs offline.
Concerning the service worker, correct me if I'm wrong, but I need to install js, yarn and dependencies. How to do it if I want to read the docs on my android browser ?

@gkalpak
Copy link
Member

gkalpak commented Mar 5, 2018

@imatmati, I am not talking about the browser cache, but the ServiceWorker cache. And no, a ServiceWorker does not require you to do anything. (In fact, you are already using a ServiceWorker in the current angular.io docs without having noticed.)

You might want to take a look at some generic resources on ServiceWorkers (like this and that) and then our guide to see how you could add ServiceWorker capabilities to your own Angular apps.

@imatmati
Copy link
Author

imatmati commented Mar 5, 2018

Thanks, I'll have a look and maybe my solution :-)

@gkalpak
Copy link
Member

gkalpak commented Mar 5, 2018

👍
Just to be clear: It will not allow you to solve the problem with viewing angular.io offline (currently), but will possibly allow us to solve this problem for you in the near future.

@petebacondarwin petebacondarwin added this to TODO in docs-infra Mar 9, 2018
@ohboyotero
Copy link

Huge +1 for anybody that travels and wants to work with docs with either no connection or a spotty one.

@gkalpak
Copy link
Member

gkalpak commented Dec 5, 2018

I am closing this issue, because we don't plan to ship a different downloadable/printable format, such as PDF, (see #19459) and the offline availability for docs is tracked in #27492.

In the meantime, with this one weird trick, you can make all the docs available for offline access: one weird trick
(It is an unofficial hack, but it works for me and might work for you too 😁)

@gkalpak gkalpak closed this as completed Dec 5, 2018
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature Issue that requests a new feature
Projects
docs-infra
BACKLOG
Development

No branches or pull requests

5 participants