From 10921a072f4e173d4e3e3549c89432da625738f5 Mon Sep 17 00:00:00 2001 From: lesion Date: Fri, 26 Jul 2019 23:53:02 +0200 Subject: [PATCH] more on documentation --- docs/_site/404.html | 26 ++- docs/_site/admin.html | 26 ++- docs/_site/assets/js/search-data.json | 35 ++- docs/_site/config.html | 64 +++++- docs/_site/contribute.html | 26 ++- docs/_site/dev.html | 35 ++- docs/_site/dev/migration.html | 277 ++++++++++++++++++++++++ docs/_site/dev/structure.html | 292 ++++++++++++++++++++++++++ docs/_site/feed.xml | 2 +- docs/_site/index.html | 28 ++- docs/_site/instances.html | 264 +++++++++++++++++++++++ docs/_site/setup.html | 26 ++- docs/_site/setup/classic.html | 26 ++- docs/_site/setup/docker.html | 26 ++- docs/_site/setup/nginx.html | 26 ++- docs/_site/usage.html | 26 ++- docs/configuration.md | 28 ++- docs/dev/dev.md | 34 +++ docs/dev/migration.md | 18 ++ docs/dev/structure.md | 36 ++++ docs/index.md | 2 +- docs/instances.md | 11 + 22 files changed, 1302 insertions(+), 32 deletions(-) create mode 100644 docs/_site/dev/migration.html create mode 100644 docs/_site/dev/structure.html create mode 100644 docs/_site/instances.html create mode 100644 docs/dev/dev.md create mode 100644 docs/dev/migration.md create mode 100644 docs/dev/structure.md create mode 100644 docs/instances.md diff --git a/docs/_site/404.html b/docs/_site/404.html index 6a8b385b..be5b48b4 100644 --- a/docs/_site/404.html +++ b/docs/_site/404.html @@ -70,6 +70,14 @@ + + + + + + + + @@ -111,6 +119,8 @@ + + @@ -172,7 +186,7 @@ @@ -188,6 +202,16 @@ + + + + + + diff --git a/docs/_site/admin.html b/docs/_site/admin.html index 7da47538..63030760 100644 --- a/docs/_site/admin.html +++ b/docs/_site/admin.html @@ -70,6 +70,14 @@ + + + + + + + + @@ -111,6 +119,8 @@ + + @@ -172,7 +186,7 @@ @@ -188,6 +202,16 @@ + + + + + + diff --git a/docs/_site/assets/js/search-data.json b/docs/_site/assets/js/search-data.json index 723c8f40..fa6226d5 100644 --- a/docs/_site/assets/js/search-data.json +++ b/docs/_site/assets/js/search-data.json @@ -23,7 +23,7 @@ "3": { "id": "3", "title": "Configuration", - "content": "Configuration 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 Title Description BaseURL Server Database Upload path SMTP Admin Favicon Secret Default settings Title The title will be in rss feed, in html head and in emails: "title": "Gancio" 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 "server": { "host": "localhost", "port": 13120 } Database "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 { "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" }", + "content": "Configuration 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 Title Description BaseURL Server Database Upload path SMTP Admin Favicon User locale Secret Default settings Title The title will be in rss feed, in html head and in emails: "title": "Gancio" 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 "server": { "host": "localhost", "port": 13120 } Database "db": { "dialect": "sqlite", "storage": "/tmp/db.sqlite" } Upload path Where to save images "upload_path": "./uploads" SMTP Admin Favicon You could specify another favicon. This is also used as logo (top-left corner): "favicon": "./favicon.ico" User locale Probably you want to modify some text for your specific community, that’s why we thought the user_locale configuration: you can specify your version of each string of gancio making a directory with your locales inside. For example, let’s say you want to modify the text inside the /about page: mkdir /opt/gancio/user_locale put something like this in /opt/gancio/user_locale/en.js to override the about in english: export default { about: 'A new about' } and then point the user_locale configuration to that directory: "user_locale": "/opt/gancio/user_locale" Watch here for a list of strings you can override. :warning: Note that a restart is needed when you change user_locale’s content. Secret Default settings { "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" }", "url": "https://gancio.org/config", "relUrl": "/config" }, @@ -36,8 +36,8 @@ }, "5": { "id": "5", - "title": "Develop", - "content": "Development Stack Gancio is built with following technologies: Nuxt.js Vue.js Express Sequelize Element.ui Testing on your own machine Download source git clone https://git.lattuga.net/cisti/gancio Install dependencies yarn Hacking yarn dev", + "title": "Hacking", + "content": "Development Stack Gancio is built with following technologies: Nuxt.js Vue.js Express Node.js Sequelize Element.ui Testing on your own machine Download source git clone https://git.lattuga.net/cisti/gancio Install dependencies yarn Hacking yarn dev", "url": "https://gancio.org/dev", "relUrl": "/dev" }, @@ -57,20 +57,41 @@ }, "8": { "id": "8", + "title": "Instances", + "content": "Instances gancio.cisti.org (Torino, Italy) lapunta.org (Firenze, Italy)", + "url": "https://gancio.org/instances", + "relUrl": "/instances" + }, + "9": { + "id": "9", + "title": "Migration", + "content": "Migration If you need to modify the db’s structure while hacking, it’s super easy, just change server/api/models/. If you then decide that your changes are good for production, a sequelize migration is needed: Create a migration: ./node_modules/.bin/sequelize migration:generate --name your_migration", + "url": "https://gancio.org/dev/migration", + "relUrl": "/dev/migration" + }, + "10": { + "id": "10", "title": "Nginx", "content": "Nginx proxy configuration This is the default nginx configuration for gancio, please modify at least the server_name and ssl_certificate’s path server { listen 80; listen [::]:80; server_name gancio.cisti.org; root /var/www/letsencrypt; location /.well-known/acme-challenge/ { allow all; } location / { return 301 https://$host$request_uri; } } server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name gancio.cisti.org; ssl_protocols TLSv1.2; ssl_ciphers HIGH:!MEDIUM:!LOW:!aNULL:!NULL:!SHA; ssl_prefer_server_ciphers on; ssl_session_cache shared:SSL:10m; # Uncomment these lines once you acquire a certificate: # ssl_certificate /etc/letsencrypt/live/gancio.cisti.org/fullchain.pem; # ssl_certificate_key /etc/letsencrypt/live/gancio.cisti.org/privkey.pem; keepalive_timeout 70; sendfile on; client_max_body_size 80m; gzip on; gzip_disable "msie6"; gzip_vary on; gzip_proxied any; gzip_comp_level 6; gzip_buffers 16 8k; gzip_http_version 1.1; gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; add_header Strict-Transport-Security "max-age=31536000"; location / { try_files $uri @proxy; } location @proxy { proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto https; proxy_set_header Proxy ""; proxy_pass_header Server; proxy_pass http://127.0.0.1:13120; proxy_buffering on; proxy_redirect off; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; tcp_nodelay on; } }", "url": "https://gancio.org/setup/nginx", "relUrl": "/setup/nginx" }, - "9": { - "id": "9", + "11": { + "id": "11", "title": "Setup", "content": "Setup Setup with docker Classic setup Nginx as a proxy Hacking & contribute", "url": "https://gancio.org/setup", "relUrl": "/setup" }, - "10": { - "id": "10", + "12": { + "id": "12", + "title": "Project Structure", + "content": "Structure API / backend Source code inside server/api/. index.js is basically a routing table pointing each PATH with specified HTTP VERB to a method of a controller. jwt is used to authenticate api request. Express is based on middleware, passing each request to a chain of methods. If you come from a PHP background, note that the main difference with Node.js is that the server process is always running and able to manage multiple requests and tasks together (asyncronically) while each php process is tied to a single request. Sequelize is used as ORM. Take a look in /server/api/models. Client / frontend Nuxt.js is used here! Nuxt is basically Vue plus SSR (Server Side Rendering). Client routing in nuxt is automatic (if you don’t need something special), just put your page inside pages and that’s it!", + "url": "https://gancio.org/dev/structure", + "relUrl": "/dev/structure" + }, + "13": { + "id": "13", "title": "Usage", "content": "Usage Add event Normal Multidate Recurrent", "url": "https://gancio.org/usage", diff --git a/docs/_site/config.html b/docs/_site/config.html index 94cd72a5..7803de13 100644 --- a/docs/_site/config.html +++ b/docs/_site/config.html @@ -70,6 +70,14 @@ + + + + + + + + @@ -111,6 +119,8 @@ + + @@ -172,7 +186,7 @@ @@ -188,6 +202,16 @@ + + + + + + @@ -203,7 +227,8 @@ @@ -241,6 +266,7 @@ This shoud be a .json or a SMTP
  • Admin
  • Favicon
  • +
  • User locale
  • Secret
  • Default settings
  • @@ -254,7 +280,7 @@ This shoud be a .json or a "title": "Gancio"

    -

    title

    +

    title

    @@ -172,7 +186,7 @@ @@ -188,6 +202,16 @@ + + + + + + diff --git a/docs/_site/dev.html b/docs/_site/dev.html index 8ad6dcb9..1af7d647 100644 --- a/docs/_site/dev.html +++ b/docs/_site/dev.html @@ -6,7 +6,7 @@ - Develop - Gancio + Hacking - Gancio @@ -25,9 +25,9 @@ -Develop | Gancio +Hacking | Gancio - + @@ -35,7 +35,7 @@ +{"@type":"WebPage","url":"https://gancio.org/dev","headline":"Hacking","description":"A shared agenda for local communities","@context":"https://schema.org"} @@ -70,6 +70,14 @@ + + + + + + + + @@ -111,6 +119,8 @@ + + @@ -172,7 +186,7 @@ @@ -188,6 +202,16 @@ + + + + + + @@ -230,6 +254,7 @@
  • Nuxt.js
  • Vue.js
  • Express
  • +
  • Node.js
  • Sequelize
  • Element.ui
  • diff --git a/docs/_site/dev/migration.html b/docs/_site/dev/migration.html new file mode 100644 index 00000000..073c3cd2 --- /dev/null +++ b/docs/_site/dev/migration.html @@ -0,0 +1,277 @@ + + + + + + + + + Migration - Gancio + + + + + + + + + + + + + + + + + + +Migration | Gancio + + + + + + + + + + + + + + + +
    + +
    + +
    + + + + + +
    +

    Migration

    +

    If you need to modify the db’s structure while hacking, it’s super easy, +just change server/api/models/.

    + +

    If you then decide that your changes are good for production, a +sequelize migration is needed:

    + +

    Create a migration:

    +

    ./node_modules/.bin/sequelize migration:generate --name your_migration

    + + + + +
    +
    +
    +
    + + + diff --git a/docs/_site/dev/structure.html b/docs/_site/dev/structure.html new file mode 100644 index 00000000..ab0e8582 --- /dev/null +++ b/docs/_site/dev/structure.html @@ -0,0 +1,292 @@ + + + + + + + + + Project Structure - Gancio + + + + + + + + + + + + + + + + + + +Project Structure | Gancio + + + + + + + + + + + + + + + +
    + +
    + +
    + + + + + +
    +

    Structure

    + +

    API / backend

    + +

    Source code inside server/api/. +index.js is basically a routing table pointing each PATH with specified +HTTP VERB to a method of a controller.

    + +

    jwt is used to authenticate api request.

    + +

    Express is based on middleware, passing each request to a chain of methods.

    + +

    If you come from a PHP background, note that the main difference with +Node.js is that the server process is always running and able to manage +multiple requests and tasks together (asyncronically) while each php +process is tied to a single request.

    + +

    Sequelize is used as ORM. Take a look in /server/api/models.

    + +

    Client / frontend

    +

    Nuxt.js is used here!
    +Nuxt is basically Vue plus SSR (Server Side Rendering). +Client routing in nuxt is automatic (if you don’t need something special), +just put your page inside pages and that’s it!

    + + + + +
    +
    +
    +
    + + + diff --git a/docs/_site/feed.xml b/docs/_site/feed.xml index 277dffb9..94aa7b4c 100644 --- a/docs/_site/feed.xml +++ b/docs/_site/feed.xml @@ -1 +1 @@ -Jekyll2019-07-25T10:35:53+02:00https://gancio.org/feed.xmlGancioA shared agenda for local communities \ No newline at end of file +Jekyll2019-07-26T23:46:47+02:00https://gancio.org/feed.xmlGancioA shared agenda for local communities \ No newline at end of file diff --git a/docs/_site/index.html b/docs/_site/index.html index a84dfcd4..383e0737 100644 --- a/docs/_site/index.html +++ b/docs/_site/index.html @@ -72,6 +72,14 @@ + + + + + + + + @@ -113,6 +121,8 @@ + + @@ -174,7 +188,7 @@ @@ -190,6 +204,16 @@ + + + + + + @@ -228,7 +252,7 @@

    A shared agenda for local communities.

    -

    Get started now Demo +

    Get started now Demo Source

    diff --git a/docs/_site/instances.html b/docs/_site/instances.html new file mode 100644 index 00000000..b8abafa8 --- /dev/null +++ b/docs/_site/instances.html @@ -0,0 +1,264 @@ + + + + + + + + + Instances - Gancio + + + + + + + + + + + + + + + + + + +Instances | Gancio + + + + + + + + + + + + + + + +
    + +
    + +
    + + + +
    +

    Instances

    + + + + + +
    +
    +
    +
    + + + diff --git a/docs/_site/setup.html b/docs/_site/setup.html index 67b50a97..90bd7408 100644 --- a/docs/_site/setup.html +++ b/docs/_site/setup.html @@ -70,6 +70,14 @@ + + + + + + + + @@ -111,6 +119,8 @@ + + @@ -172,7 +186,7 @@ @@ -188,6 +202,16 @@ + + + + + + diff --git a/docs/_site/setup/classic.html b/docs/_site/setup/classic.html index 07ebe49c..07f00ed4 100644 --- a/docs/_site/setup/classic.html +++ b/docs/_site/setup/classic.html @@ -70,6 +70,14 @@ + + + + + + + + @@ -111,6 +119,8 @@ + + @@ -172,7 +186,7 @@ @@ -188,6 +202,16 @@ + + + + + + diff --git a/docs/_site/setup/docker.html b/docs/_site/setup/docker.html index c0bce322..eb714944 100644 --- a/docs/_site/setup/docker.html +++ b/docs/_site/setup/docker.html @@ -70,6 +70,14 @@ + + + + + + + + @@ -111,6 +119,8 @@ + + @@ -172,7 +186,7 @@ @@ -188,6 +202,16 @@ + + + + + + diff --git a/docs/_site/setup/nginx.html b/docs/_site/setup/nginx.html index af3ecc21..b48c1607 100644 --- a/docs/_site/setup/nginx.html +++ b/docs/_site/setup/nginx.html @@ -70,6 +70,14 @@ + + + + + + + + @@ -111,6 +119,8 @@ + + @@ -172,7 +186,7 @@ @@ -188,6 +202,16 @@ + + + + + + diff --git a/docs/_site/usage.html b/docs/_site/usage.html index b339c8f3..8470f118 100644 --- a/docs/_site/usage.html +++ b/docs/_site/usage.html @@ -70,6 +70,14 @@ + + + + + + + + @@ -111,6 +119,8 @@ + + @@ -172,7 +186,7 @@ @@ -188,6 +202,16 @@ + + + + + + diff --git a/docs/configuration.md b/docs/configuration.md index 878708b0..36583974 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -54,9 +54,33 @@ Where to save images - ### SMTP - ### Admin - ### Favicon -You could specify another favicon +You could specify another favicon. This is also used as logo (top-left +corner): `"favicon": "./favicon.ico"` +- ### User locale +Probably you want to modify some text for your specific community, that's +why we thought the `user_locale` configuration: you can specify your version of +each string of **gancio** making a directory with your locales inside. +For example, let's say you want to modify the text inside the `/about` +page: +`mkdir /opt/gancio/user_locale` +put something like this in `/opt/gancio/user_locale/en.js` to override the about in +english: +```js +export default { + about: 'A new about' +} +``` +and then point the `user_locale` configuration to that directory: +```json +"user_locale": "/opt/gancio/user_locale" +``` +Watch [here](https://git.lattuga.net/cisti/gancio/src/master/locales) for a +list of strings you can override. +:warning: Note that a restart is needed when you change +user_locale's content. + - ### Secret @@ -87,4 +111,4 @@ You could specify another favicon "admin": "", "secret": "notsosecret" } -``` \ No newline at end of file +``` diff --git a/docs/dev/dev.md b/docs/dev/dev.md new file mode 100644 index 00000000..99cc70e3 --- /dev/null +++ b/docs/dev/dev.md @@ -0,0 +1,34 @@ +--- +layout: default +title: Hacking +permalink: /dev +nav_order: 5 +--- + +### Development Stack + +**Gancio** is built with following technologies: + +- [Nuxt.js](https://nuxtjs.org/) +- Vue.js +- Express +- Node.js +- Sequelize +- Element.ui + +### Testing on your own machine + +2. Download source +```bash +git clone https://git.lattuga.net/cisti/gancio +``` + +3. Install dependencies +```bash +yarn +``` + +4. Hacking +```bash +yarn dev +``` diff --git a/docs/dev/migration.md b/docs/dev/migration.md new file mode 100644 index 00000000..f0e65547 --- /dev/null +++ b/docs/dev/migration.md @@ -0,0 +1,18 @@ +--- +layout: default +title: Migration +permalink: /dev/migration +parent: Hacking +--- + +### Migration +If you need to modify the db's structure while hacking, it's super easy, +just change `server/api/models/`. + +If you then decide that your changes are good for production, a +sequelize migration is needed: + +#### Create a migration: +`./node_modules/.bin/sequelize migration:generate --name your_migration` + + diff --git a/docs/dev/structure.md b/docs/dev/structure.md new file mode 100644 index 00000000..6324a01e --- /dev/null +++ b/docs/dev/structure.md @@ -0,0 +1,36 @@ +--- +layout: default +title: Project Structure +permalink: /dev/structure +parent: Hacking +--- + +### Structure + + +### API / backend + +Source code inside `server/api/`. +`index.js` is basically a routing table pointing each PATH with specified +HTTP VERB to a method of a controller. + +jwt is used to authenticate api request. + +Express is based on middleware, passing each request to a chain of methods. + +If you come from a PHP background, note that the main difference with +Node.js is that the server process is always running and able to manage +multiple requests and tasks together (asyncronically) while each php +process is tied to a single request. + +Sequelize is used as ORM. Take a look in `/server/api/models`. + + +### Client / frontend +Nuxt.js is used here! +Nuxt is basically Vue plus SSR (Server Side Rendering). +Client routing in nuxt is automatic (if you don't need something special), +just put your page inside `pages` and that's it! + + + diff --git a/docs/index.md b/docs/index.md index 352565f6..b717b3ff 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.gancio.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/instances.md b/docs/instances.md new file mode 100644 index 00000000..f67e016a --- /dev/null +++ b/docs/instances.md @@ -0,0 +1,11 @@ +--- +layout: default +title: Instances +permalink: /instances +nav_order: 7 +--- + +## Instances + +- [gancio.cisti.org](https://gancio.cisti.org) (Torino, Italy) +- [lapunta.org](https://lapunta.org) (Firenze, Italy)