1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-07-18 20:59:42 +02:00

Added ability to use custom favicon (#202)

* Added ability to change favicon in config

* Turned back version of icon in index.twig

* Added opportunity to upload favicon and route to get saved favicon

* Removed favicon from .codexdocsrc.sample

* Added docs to favicon route

* Replaced uploadFavicon to initiating /favicon route, updated function, added catching errors from uploadFile

* Updated Readme, added info about setting up app

* Updated Readme.md

* Some changes

* Favicon data saves to app.locals, replaced uploading favicon to app.ts

* Changed naming in config, from faviconURL to favicon, changed using app.locals variables

* Renamed uploadFavicon to downLoadFavicon, removed log in locals.ts

* Renamed favicon variable in app.ts

* Added checking favicon before uploading function, removed passing locals to views

* Added timeout for uploading favicon request and writeFileSync changed to writeFile

* Removed passing favicon locals and turned back removed variables

* Turned back variables

* Fixed duplicating os.tmpdir

* Fixed braces in objects, added new lines

* Added default favicon path, if favicon does not exists in config

* Updated docs, fixed using local favicon
This commit is contained in:
slaveeks 2022-07-10 15:21:32 +03:00 committed by GitHub
parent ac40723c16
commit 5c4183b717
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 23484 additions and 8 deletions

View file

@ -83,6 +83,21 @@ yarn lint
yarn test
```
### Setup
You can configure application using configs in <code>/config</code> directory.
| Property | Role |
|----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| <code>port</code> | to set port of application |
| <code>database</code> | to name directory with data |
| <code>rcFile</code> | to set destination of codexdocsrc config file |
| <code>uploads</code> | to set destination of directory to save uploads |
| <code>secret</code> | to set secret |
| <code>favicon</code> | to set url or favicon path (favicon need to be in /public directory), like `/myFavicon.png`, to get favicon. Server uploads file by url and saves it to temporary directory. And you can get favicon by /favicon static route of application |
You can configure application using configs in <code>/config</code> directory.
### Authentication
To manage pages you need to authorize (available on `/auth`).