mirror of
https://gitea.com/gitea/docs.git
synced 2026-07-22 02:37:42 +00:00
Add USE_SERVICE_WORKER setting (#9110)
* Add USE_SERVICE_WORKER setting This will be very useful setting for anyone doing frontend work. Fixes: https://github.com/go-gitea/gitea/issues/9044 * prevent potential syntax error on old browsers
This commit is contained in:
committed by
techknowlogick
parent
3cf0754d99
commit
bb54625432
@@ -118,8 +118,9 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`.
|
|||||||
- `DEFAULT_THEME`: **gitea**: \[gitea, arc-green\]: Set the default theme for the Gitea install.
|
- `DEFAULT_THEME`: **gitea**: \[gitea, arc-green\]: Set the default theme for the Gitea install.
|
||||||
- `THEMES`: **gitea,arc-green**: All available themes. Allow users select personalized themes
|
- `THEMES`: **gitea,arc-green**: All available themes. Allow users select personalized themes
|
||||||
regardless of the value of `DEFAULT_THEME`.
|
regardless of the value of `DEFAULT_THEME`.
|
||||||
- `DEFAULT_SHOW_FULL_NAME`: false: Whether the full name of the users should be shown where possible. If the full name isn't set, the username will be used.
|
- `DEFAULT_SHOW_FULL_NAME`: **false**: Whether the full name of the users should be shown where possible. If the full name isn't set, the username will be used.
|
||||||
- `SEARCH_REPO_DESCRIPTION`: true: Whether to search within description at repository search on explore page.
|
- `SEARCH_REPO_DESCRIPTION`: **true**: Whether to search within description at repository search on explore page.
|
||||||
|
- `USE_SERVICE_WORKER`: **true**: Whether to enable a Service Worker to cache frontend assets.
|
||||||
|
|
||||||
### UI - Admin (`ui.admin`)
|
### UI - Admin (`ui.admin`)
|
||||||
|
|
||||||
|
|||||||
@@ -138,9 +138,9 @@ make revive vet misspell-check
|
|||||||
|
|
||||||
### Updating CSS
|
### Updating CSS
|
||||||
|
|
||||||
To generate the CSS, you will need [Node.js](https://nodejs.org/) 8.0 or greater with npm. At present we use [less](http://lesscss.org/) and [postcss](https://postcss.org) to generate our CSS. Do **not** edit the files in `public/css` directly, as they are generated from `lessc` from the files in `public/less`.
|
To generate the CSS, you need [Node.js](https://nodejs.org/) 8.0 or greater with npm. We use [less](http://lesscss.org/) and [postcss](https://postcss.org) to generate our CSS. Do **not** edit the files in `public/css` directly, as they are generated from `lessc` from the files in `public/less`.
|
||||||
|
|
||||||
Edit files in `public/less`, run the linter, regenerate the CSS and commit all changed files:
|
Edit files in `public/less`, and then run the linter and build the CSS files via:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
make css
|
make css
|
||||||
@@ -148,12 +148,14 @@ make css
|
|||||||
|
|
||||||
### Updating JS
|
### Updating JS
|
||||||
|
|
||||||
To run the JavaScript linter you will need [Node.js](https://nodejs.org/) 8.0 or greater with npm. Edit files in `public/js` and run the linter:
|
To generate the JS files, you need [Node.js](https://nodejs.org/) 8.0 or greater with npm. Edit files in `public/js`, run the linter and build the JS files via:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
make js
|
make js
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Note: When working on frontend code, it is advisable to set `USE_SERVICE_WORKER` to `false` in `app.ini` which will prevent undesirable caching of frontend assets.
|
||||||
|
|
||||||
### Updating the API
|
### Updating the API
|
||||||
|
|
||||||
When creating new API routes or modifying existing API routes, you **MUST**
|
When creating new API routes or modifying existing API routes, you **MUST**
|
||||||
|
|||||||
Reference in New Issue
Block a user