diff options
| author | Jieiku | 2023-09-08 15:08:39 -0700 |
|---|---|---|
| committer | Jieiku | 2023-09-08 15:08:39 -0700 |
| commit | 5e55301cc2c91a5f0e99000bfe4d7ec262ee78c1 (patch) | |
| tree | d034c24a0debdb22066c659fa67ab5564227acdd /content/overview-abridge/index.md | |
| parent | 288de9dac39869ac94d0265351f5884a78dce5a8 (diff) | |
| download | abridge-2.2.0.tar.gz abridge-2.2.0.tar.bz2 abridge-2.2.0.zip | |
Refactor package.json2.2.0
Diffstat (limited to 'content/overview-abridge/index.md')
| -rw-r--r-- | content/overview-abridge/index.md | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/content/overview-abridge/index.md b/content/overview-abridge/index.md index b36c9d3..909e069 100644 --- a/content/overview-abridge/index.md +++ b/content/overview-abridge/index.md @@ -24,6 +24,7 @@ A fast, lightweight, and modern [Zola](https://getzola.org) theme utilizing [abr - [X] Dark, Light, Auto, and Switcher themes. (colors can be customized, css variables) - [X] Code [syntax highlighting](https://abridge.netlify.app/overview-code-blocks/). (colors can be customized, css variables) - [X] Numbered code blocks with [line highlighting](https://abridge.netlify.app/overview-code-blocks/#toml). +- [X] Entirely Offline Site by using the PWA **or** by setting `offline = true` in `config.toml` (full search support). - [X] Multi-language support. - [X] Search support. (elasticlunr, tinysearch, stork) - [X] Search Suggestions navigation keys, `/` focus, `arrow` move, `enter` select, `escape` close. @@ -93,8 +94,8 @@ rsync themes/abridge/config.toml config.toml rsync themes/abridge/content/_index.md content/ rsync themes/abridge/COPY-TO-ROOT-SASS/* sass/ rsync themes/abridge/netlify.toml netlify.toml +rsync themes/abridge/package_abridge.js package_abridge.js rsync themes/abridge/package.json package.json -rsync -r themes/abridge/content/static content/ ``` - `templates/.gitkeep` the templates directory is required in your base site. [#2150](https://github.com/getzola/zola/issues/2150) @@ -102,8 +103,8 @@ rsync -r themes/abridge/content/static content/ - `content/_index.md` required to set pagination. - `COPY-TO-ROOT-SASS/abridge.scss` overrides to customize Abridge variables. - `netlify.toml` settings to deploy your repo with netlfiy. +- `package_abridge.js` node script to: update cache files list in PWA, minify js, bundle js - `package.json` to switch between nosearch, elasticlunr, tinysearch, stork. -- `content/static` files for generating tinysearch and stork indexes. Uncomment the theme line in your project's root config.toml: @@ -274,7 +275,7 @@ If using Chrome on desktop then look at the end of the address bar for the insta To use it in your own instance you will need to edit `static/sw.js` for the list of files to cache. Technically you do not need to edit `sw.js`, but if even a single file in the cache list is missing then it wont pre cache the list, so it will only cache as you browse. -There is an npm script to generate the file cache list and minification `npm run pwa`. My `netlify.toml` file automatically runs this npm script during site deployment, so everything is automatic. If Zola was able to template a js file then it might be possible to generate the list of cache files dynamically at build. +There is an npm script to generate the file cache list and minification `npm run abridge`. My `netlify.toml` file automatically runs this npm script during site deployment, so everything is automatic. If Zola was able to template a js file then it might be possible to generate the list of cache files dynamically at build instead of relying on node/npm. The PWA feature is also easy to disable by simply setting `pwa = false` in `config.toml` @@ -311,14 +312,11 @@ These are the javascript files used by Abridge: `js_bundle` when set to true serves a bundle file instead of all of the individual js files. -All Bundles are defined in [package.json](https://github.com/Jieiku/abridge/blob/master/package.json) +All necessary bundles are dynamically generated by the node script [package_abridge.js](https://github.com/Jieiku/abridge/blob/master/package_abridge.js) -A Bundle can be generated from the package.json scripts using npm: +The node script will scan your config.toml for relevant config values, and then based on your config.tomnl generate your required bundles. -- `npm run nosearch` - generates a bundle without search. -- `npm run elasticlunr` - generates a bundle of all js with elasticlunr. -- `npm run tinysearch` - generates a bundle of all js with tinysearch. -- `npm run stork` - generates a bundle of all js with stork. +All that is necessary is `zola build && npm run abridge`. #### Switch Search Library |
