diff --git a/docs/.gitignore b/docs/.gitignore index 45c15053..9af2c358 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1,3 +1,2 @@ -_site .sass-cache .jekyll-metadata diff --git a/docs/_config.yml b/docs/_config.yml index 0066e4db..1a43e588 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -17,8 +17,8 @@ title: Gancio email: gancio@cisti.org description: >- # this means to ignore newlines until "baseurl:" A shared agenda for local communities -baseurl: "/gancio" # the subpath of your site, e.g. /blog -url: "https://prove.fugadalcontrollo.org" # the base hostname & protocol for your site, e.g. http://example.com +baseurl: "/" # the subpath of your site, e.g. /blog +url: "https://gancio.org" # the base hostname & protocol for your site, e.g. http://example.com #twitter_username: jekyllrb #github_username: jekyll diff --git a/docs/admin.md b/docs/admin.md index 798f72c2..e57b4963 100644 --- a/docs/admin.md +++ b/docs/admin.md @@ -13,7 +13,7 @@ nav_order: 5 {:toc} ## Basics - +## Add user ## Enable registration ## Confirm registration ## Confirm event \ No newline at end of file diff --git a/docs/assets/title.png b/docs/assets/title.png new file mode 100644 index 00000000..2fe59247 Binary files /dev/null and b/docs/assets/title.png differ diff --git a/docs/configuration.md b/docs/configuration.md new file mode 100644 index 00000000..878708b0 --- /dev/null +++ b/docs/configuration.md @@ -0,0 +1,90 @@ +--- +layout: default +title: Configuration +permalink: /config +nav_order: 3 +--- + +# Configuration +{: .no_toc } +Main `gancio` configuration is done with a configuration file. +This shoud be a `.json` or a `.js` file and could be specified using the `--config` flag. + +- eg. `gancio start --config ./config.json` +- eg. `pm2 start gancio start -- --config ~/config.json` + +1. TOC +{:toc} + +- ### Title +The title will be in rss feed, in html head and in emails: + +`"title": "Gancio"` + +![title](assets/title.png) + +- ### Description +`"description": "a shared agenda for local communities"` + +- ### BaseURL +URL where your site will be accessible (include http or https): +`"baseurl": "https://gancio.cisti.org"` + +- ### Server +This probably support unix socket too :D + +```json +"server": { + "host": "localhost", + "port": 13120 +} +``` + +- ### Database +```json + "db": { + "dialect": "sqlite", + "storage": "/tmp/db.sqlite" + } +``` +- ### Upload path +Where to save images +`"upload_path": "./uploads"` + +- ### SMTP +- ### Admin +- ### Favicon +You could specify another favicon +`"favicon": "./favicon.ico"` + +- ### Secret + + +## Default settings +```json +{ + "title": "Gancio", + "description": "A shared agenda for local communities", + "baseurl": "http://localhost:13120", + "server": { + "host": "0.0.0.0", + "port": 13120 + }, + "db": { + "dialect": "sqlite", + "storage": "/tmp/db.sqlite" + }, + "upload_path": "./", + "favicon": "../dist/favicon.ico", + "smtp": { + "auth": { + "user": "", + "pass": "" + }, + "secure": true, + "host": "" + }, + "admin": "", + "secret": "notsosecret" +} +``` \ No newline at end of file diff --git a/docs/contribute.md b/docs/contribute.md index 17785f9f..1707fb6f 100644 --- a/docs/contribute.md +++ b/docs/contribute.md @@ -6,7 +6,7 @@ nav_order: 6 --- # Contribute {: .no_toc } - +If you want to contribute, take a look at the [issues](https://git.lattuga.net/cisti/gancio/issues) 1. TOC {:toc} diff --git a/docs/index.md b/docs/index.md index b239ee75..352565f6 100644 --- a/docs/index.md +++ b/docs/index.md @@ -12,7 +12,7 @@ permalink: / A shared agenda for local communities. {: .fs-6 } -[Get started now](/setup){: .btn .btn-primary .fs-5 .mb-4 .mb-md-0 .mr-2 } [Demo](https://demo.fugadalcontrollo.org){: .btn .btn-green .fs-5 .mb-4 .mb-md-0 } +[Get started now](setup){: .btn .btn-primary .fs-5 .mb-4 .mb-md-0 .mr-2 } [Demo](https://demo.fugadalcontrollo.org){: .btn .btn-green .fs-5 .mb-4 .mb-md-0 } [Source](https://git.lattuga.net/cisti/gancio){: .btn .fs-5 } diff --git a/docs/settings.md b/docs/settings.md deleted file mode 100644 index f0869ee2..00000000 --- a/docs/settings.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -layout: default -title: Settings -permalink: /settings -nav_order: 3 ---- - -# Settings -Main `gancio` configuration is done with a configuration file. -This shoud be a `.json` or a `.js` file and could be specified using the `--config` flag. - -- eg. `gancio start --config ./config.json' -- eg. `pm2 start gancio start -- --config ~/config.json' - -Default configuration -{: .no_toc } - -1. TOC -{:toc} - - -#### Title -#### - - -## Default settings -```json -{ - "title": "Gancio", - "description": "A shared agenda for local communities", - "baseurl": "http://localhost:13120", - "server": { - "host": "0.0.0.0", - "port": 13120 - }, - "db": { - "dialect": "sqlite", - "storage": "/tmp/db.sqlite" - }, - "upload_path": "./", - "favicon": "../dist/favicon.ico", - "smtp": { - "auth": { - "user": "", - "pass": "" - }, - "secure": true, - "host": "" - }, - "admin": { - "email": "", - "password": "" - }, - "secret": "notsosecret" -} -``` \ No newline at end of file diff --git a/docs/setup/classic.md b/docs/setup/classic.md index 35b11b22..75dedff8 100644 --- a/docs/setup/classic.md +++ b/docs/setup/classic.md @@ -17,15 +17,6 @@ apt-get install -y nodejs postgresql ```bash npm install --global gancio ``` -3. Create database (optional) -```sql -apt install postgresql -sudo -u postgres psql -postgres=# create database gancio; -postgres=# create user gancio with encrypted password 'gancio'; -postgres=# grant all privileges on database gancio to gancio; -``` - 1. Create a database (optional as you can use sqlite, but recommended) ```bash sudo -u postgres psql @@ -43,14 +34,13 @@ su gancio 1. Test & launch interactive setup ```bash gancio --help -gancio setup +gancio setup --config config.json ``` 1. Start ```bash gancio --help -gancio setup -gancio start +gancio start --config config.json ``` 1. Point your web browser to [http://localhost:13120](http://localhost:13120) or where you selected during setup. @@ -61,5 +51,5 @@ If you don't use the [docker way](/setup/docker), in production you should use s ```bash sudo npm install --global pm2 -pm2 gancio start +pm2 gancio start --config config.json ``` diff --git a/docs/setup/dev.md b/docs/setup/dev.md deleted file mode 100644 index 3033dfb4..00000000 --- a/docs/setup/dev.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -layout: default -title: Classic -permalink: /setup/classic -parent: Setup ---- - -## Classic setup - -1. Install Node.js and postgreSQL -```bash -curl -sL https://deb.nodesource.com/setup_12.x | bash - -apt-get install -y nodejs postgresql -``` -[source](https://github.com/nodesource/distributions/blob/master/README.md) -1. Install Gancio -```bash -npm install --global gancio -``` - -1. Create a database (optional as you can use sqlite, but recommended) -```bash -sudo -u postgres psql -postgres=# create database gancio; -postgres=# create user gancio with encrypted password 'gancio'; -postgres=# grant all privileges on database gancio to gancio; -``` - -1. Create a user to run gancio from -```bash -adduser gancio -su gancio -``` - -1. Test & launch interactive setup -```bash -gancio --help -gancio setup -``` - -1. Start -```bash -gancio start -``` -1. Point your web browser to [http://localhost:13120](http://localhost:13120) or where you selected during setup. - -1. [Setup nginx as a proxy](/setup/nginx) - -1. Deploy in production -If you don't use the [docker way](/setup/docker), in production you should use something like **[pm2](http://pm2.keymetrics.io/)**: - -```bash -sudo npm install --global pm2 -pm2 gancio start -``` diff --git a/docs/setup/setup.md b/docs/setup/setup.md index 161fd097..145bdbf9 100644 --- a/docs/setup/setup.md +++ b/docs/setup/setup.md @@ -10,7 +10,7 @@ has_toc: false # Setup -- ## [Setup with docker](/setup/docker) -- ## [Classic setup](/setup/classic) -- ## [Nginx as a proxy](/setup/nginx) -- ## [Hacking & contribute](/dev) \ No newline at end of file +- [Setup with docker](docker) +- [Classic setup](classic) +- [Nginx as a proxy](nginx) +- [Hacking & contribute](../dev) \ No newline at end of file