mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-08 19:57:46 -04:00
Update instructions for building packaged app
Former-commit-id: bcfb3f0e19bb6d5e56a5d2b816ee9191ffe63038 [formerly b5312eb0f4dda47c12b98e6f8409d140fef16ac8] Former-commit-id: df8c66f9a8172057c3f037f718b54d91dbf5f78d
This commit is contained in:
parent
26c73c1a79
commit
8a04c1bebe
@ -10,6 +10,10 @@ If you have a distribution of this app and want to delete the packaged archive t
|
||||
params['fileVersion'] = "descriptive_name_of_your_file (Jan-2020)"; // These values will show in the app, but they are not important
|
||||
params['cachedStartPage'] = false;``
|
||||
|
||||
You can have more than one ZIM archive in `archives`, but only one weill launch on app startup as the packaged file. If you do have more than one, then be sure to set `params['showFileSelectors'] = true;` to aid in discoverability of the other archive, otherwise your users will not eaeily realize it is there. That setting dedicates the app to the packaged archive, but users can still override and pick a different ZIM by changing the value in Expert Settings (Config).
|
||||
|
||||
## Building the app
|
||||
|
||||
If you are building a packaged version of the app, you should use a generic name for the ZIM, like `wikivoyage_en.zim` and then give the real name as as the `*.zim.txt` file in this directory, e.g. `wikivoyage_en_all_novid_2019-07.zim.txt`. The text file can be empty (0 bytes). You should also set the fields listed above in `www/js/init.js` to match, and additionally decide whether to set `params['showFileSelectors'] = false;`. That setting dedicates the app to the packaged archive, but users can still override and pick a different ZIM by changing the value in Expert Settings (Config).
|
||||
If you are building a custom packaged version of the app, then remember that ZIMs will not appear in your online GitHub repo, so add a text file to `archives` to show the intended filename, like the `*.zim.txt` file in this directory, e.g. `wikivoyage_en_all_novid_2019-07.zim.txt`. The text file can be empty (0 bytes). You should also set the fields listed above in `www/js/init.js` to match, and additionally decide whether to set `params['showFileSelectors'] = false;` (if you want to simplify the interface in Config).
|
||||
|
||||
Advanced: If you wish to restrict the files that users can search for on the server, e.g. to ensure your app remains dedicated to WikiMed archives, and to aid discoverability of only those archives, then look in `kiwixServe.js` and search for `DEV:` (first comment labelled `DEV:`) for more info.
|
||||
|
Loading…
x
Reference in New Issue
Block a user