Commit 10921a07 authored by les's avatar les
Browse files

more on documentation

parent 4da5e6dc
......@@ -70,6 +70,14 @@
......@@ -111,6 +119,8 @@
<li class="navigation-list-item ">
<a href="https://gancio.org/setup/nginx" class="navigation-list-link">Nginx</a>
......@@ -132,6 +142,10 @@
</ul>
</li>
......@@ -172,7 +186,7 @@
<li class="navigation-list-item">
<a href="https://gancio.org/dev" class="navigation-list-link">Develop</a>
<a href="https://gancio.org/dev" class="navigation-list-link">Hacking</a>
</li>
......@@ -188,6 +202,16 @@
<li class="navigation-list-item">
<a href="https://gancio.org/instances" class="navigation-list-link">Instances</a>
</li>
</ul>
</nav>
......
......@@ -70,6 +70,14 @@
......@@ -111,6 +119,8 @@
<li class="navigation-list-item ">
<a href="https://gancio.org/setup/nginx" class="navigation-list-link">Nginx</a>
......@@ -132,6 +142,10 @@
</ul>
</li>
......@@ -172,7 +186,7 @@
<li class="navigation-list-item">
<a href="https://gancio.org/dev" class="navigation-list-link">Develop</a>
<a href="https://gancio.org/dev" class="navigation-list-link">Hacking</a>
</li>
......@@ -188,6 +202,16 @@
<li class="navigation-list-item">
<a href="https://gancio.org/instances" class="navigation-list-link">Instances</a>
</li>
</ul>
</nav>
......
......@@ -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: &quot;title&quot;: &quot;Gancio&quot; Description &quot;description&quot;: &quot;a shared agenda for local communities&quot; BaseURL URL where your site will be accessible (include http or https): &quot;baseurl&quot;: &quot;https://gancio.cisti.org&quot; Server This probably support unix socket too :D &quot;server&quot;: { &quot;host&quot;: &quot;localhost&quot;, &quot;port&quot;: 13120 } Database &quot;db&quot;: { &quot;dialect&quot;: &quot;sqlite&quot;, &quot;storage&quot;: &quot;/tmp/db.sqlite&quot; } Upload path Where to save images &quot;upload_path&quot;: &quot;./uploads&quot; SMTP Admin Favicon You could specify another favicon &quot;favicon&quot;: &quot;./favicon.ico&quot; Secret Default settings { &quot;title&quot;: &quot;Gancio&quot;, &quot;description&quot;: &quot;A shared agenda for local communities&quot;, &quot;baseurl&quot;: &quot;http://localhost:13120&quot;, &quot;server&quot;: { &quot;host&quot;: &quot;0.0.0.0&quot;, &quot;port&quot;: 13120 }, &quot;db&quot;: { &quot;dialect&quot;: &quot;sqlite&quot;, &quot;storage&quot;: &quot;/tmp/db.sqlite&quot; }, &quot;upload_path&quot;: &quot;./&quot;, &quot;favicon&quot;: &quot;../dist/favicon.ico&quot;, &quot;smtp&quot;: { &quot;auth&quot;: { &quot;user&quot;: &quot;&quot;, &quot;pass&quot;: &quot;&quot; }, &quot;secure&quot;: true, &quot;host&quot;: &quot;&quot; }, &quot;admin&quot;: &quot;&quot;, &quot;secret&quot;: &quot;notsosecret&quot; }",
"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: &quot;title&quot;: &quot;Gancio&quot; Description &quot;description&quot;: &quot;a shared agenda for local communities&quot; BaseURL URL where your site will be accessible (include http or https): &quot;baseurl&quot;: &quot;https://gancio.cisti.org&quot; Server This probably support unix socket too :D &quot;server&quot;: { &quot;host&quot;: &quot;localhost&quot;, &quot;port&quot;: 13120 } Database &quot;db&quot;: { &quot;dialect&quot;: &quot;sqlite&quot;, &quot;storage&quot;: &quot;/tmp/db.sqlite&quot; } Upload path Where to save images &quot;upload_path&quot;: &quot;./uploads&quot; SMTP Admin Favicon You could specify another favicon. This is also used as logo (top-left corner): &quot;favicon&quot;: &quot;./favicon.ico&quot; 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: &#39;A new about&#39; } and then point the user_locale configuration to that directory: &quot;user_locale&quot;: &quot;/opt/gancio/user_locale&quot; 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 { &quot;title&quot;: &quot;Gancio&quot;, &quot;description&quot;: &quot;A shared agenda for local communities&quot;, &quot;baseurl&quot;: &quot;http://localhost:13120&quot;, &quot;server&quot;: { &quot;host&quot;: &quot;0.0.0.0&quot;, &quot;port&quot;: 13120 }, &quot;db&quot;: { &quot;dialect&quot;: &quot;sqlite&quot;, &quot;storage&quot;: &quot;/tmp/db.sqlite&quot; }, &quot;upload_path&quot;: &quot;./&quot;, &quot;favicon&quot;: &quot;../dist/favicon.ico&quot;, &quot;smtp&quot;: { &quot;auth&quot;: { &quot;user&quot;: &quot;&quot;, &quot;pass&quot;: &quot;&quot; }, &quot;secure&quot;: true, &quot;host&quot;: &quot;&quot; }, &quot;admin&quot;: &quot;&quot;, &quot;secret&quot;: &quot;notsosecret&quot; }",
"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 &quot;msie6&quot;; 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 &quot;max-age=31536000&quot;; location / { try_files $uri @proxy; } location @proxy { proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto https; proxy_set_header Proxy &quot;&quot;; 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 &amp; 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",
......
......@@ -70,6 +70,14 @@
......@@ -111,6 +119,8 @@
<li class="navigation-list-item ">
<a href="https://gancio.org/setup/nginx" class="navigation-list-link">Nginx</a>
......@@ -132,6 +142,10 @@
</ul>
</li>
......@@ -172,7 +186,7 @@
<li class="navigation-list-item">
<a href="https://gancio.org/dev" class="navigation-list-link">Develop</a>
<a href="https://gancio.org/dev" class="navigation-list-link">Hacking</a>
</li>
......@@ -188,6 +202,16 @@
<li class="navigation-list-item">
<a href="https://gancio.org/instances" class="navigation-list-link">Instances</a>
</li>
</ul>
</nav>
......@@ -203,7 +227,8 @@
<div class="search js-search">
<div class="search-input-wrap">
<input type="text" class="js-search-input search-input" tabindex="0" placeholder="Search Gancio" aria-label="Search Gancio" autocomplete="off">
<svg width="14" height="14" viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg" class="search-icon"><title>Search</title><g fill-rule="nonzero"><path d="M17.332 20.735c-5.537 0-10-4.6-10-10.247 0-5.646 4.463-10.247 10-10.247 5.536 0 10 4.601 10 10.247s-4.464 10.247-10 10.247zm0-4c3.3 0 6-2.783 6-6.247 0-3.463-2.7-6.247-6-6.247s-6 2.784-6 6.247c0 3.464 2.7 6.247 6 6.247z"/><path d="M11.672 13.791L.192 25.271 3.02 28.1 14.5 16.62z"/></g></svg>
<svg width="14" height="14" viewbox="0 0 28 28" xmlns="http://www.w3.org/2000/svg" class="search-icon"><title>Search</title>
<g fill-rule="nonzero"><path d="M17.332 20.735c-5.537 0-10-4.6-10-10.247 0-5.646 4.463-10.247 10-10.247 5.536 0 10 4.601 10 10.247s-4.464 10.247-10 10.247zm0-4c3.3 0 6-2.783 6-6.247 0-3.463-2.7-6.247-6-6.247s-6 2.784-6 6.247c0 3.464 2.7 6.247 6 6.247z"></path><path d="M11.672 13.791L.192 25.271 3.02 28.1 14.5 16.62z"></path></g></svg>
</div>
<div class="js-search-results search-results-wrap"></div>
</div>
......@@ -241,6 +266,7 @@ This shoud be a <code class="highlighter-rouge">.json</code> or a <code class="h
<li><a href="#smtp" id="markdown-toc-smtp">SMTP</a></li>
<li><a href="#admin" id="markdown-toc-admin">Admin</a></li>
<li><a href="#favicon" id="markdown-toc-favicon">Favicon</a></li>
<li><a href="#user-locale" id="markdown-toc-user-locale">User locale</a></li>
<li><a href="#secret" id="markdown-toc-secret">Secret</a></li>
<li><a href="#default-settings" id="markdown-toc-default-settings">Default settings</a></li>
</ol>
......@@ -254,7 +280,7 @@ This shoud be a <code class="highlighter-rouge">.json</code> or a <code class="h
<p><code class="highlighter-rouge">"title": "Gancio"</code></p>
<p><img src="assets/title.png" alt="title" /></p>
<p><img src="assets/title.png" alt="title"></p>
<ul>
<li>
......@@ -263,7 +289,7 @@ This shoud be a <code class="highlighter-rouge">.json</code> or a <code class="h
</li>
<li>
<h3 id="baseurl">BaseURL</h3>
<p>URL where your site will be accessible (include http or https):<br />
<p>URL where your site will be accessible (include http or https):<br>
<code class="highlighter-rouge">"baseurl": "https://gancio.cisti.org"</code></p>
</li>
<li>
......@@ -281,7 +307,8 @@ This shoud be a <code class="highlighter-rouge">.json</code> or a <code class="h
<ul>
<li>
<h3 id="database">Database</h3>
<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="s2">"db"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
<div class="language-json highlighter-rouge">
<div class="highlight"><pre class="highlight"><code><span class="s2">"db"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w">
</span><span class="s2">"dialect"</span><span class="p">:</span><span class="w"> </span><span class="s2">"sqlite"</span><span class="p">,</span><span class="w">
</span><span class="s2">"storage"</span><span class="p">:</span><span class="w"> </span><span class="s2">"/tmp/db.sqlite"</span><span class="w">
</span><span class="p">}</span><span class="w">
......@@ -300,8 +327,33 @@ This shoud be a <code class="highlighter-rouge">.json</code> or a <code class="h
</li>
<li>
<h3 id="favicon">Favicon</h3>
<p>You could specify another favicon
<p>You could specify another favicon. This is also used as logo (top-left
corner): <br>
<code class="highlighter-rouge">"favicon": "./favicon.ico"</code></p>
</li>
<li>
<h3 id="user-locale">User locale</h3>
<p>Probably you want to modify some text for your specific community, that’s
why we thought the <code class="highlighter-rouge">user_locale</code> configuration: you can specify your version of
each string of <strong>gancio</strong> making a directory with your locales inside.
For example, let’s say you want to modify the text inside the <code class="highlighter-rouge">/about</code>
page:<br>
<code class="highlighter-rouge">mkdir /opt/gancio/user_locale</code>
put something like this in <code class="highlighter-rouge">/opt/gancio/user_locale/en.js</code> to override the about in
english:</p>
<div class="language-js highlighter-rouge">
<div class="highlight"><pre class="highlight"><code><span class="k">export</span> <span class="k">default</span> <span class="p">{</span>
<span class="na">about</span><span class="p">:</span> <span class="dl">'</span><span class="s1">A new about</span><span class="dl">'</span>
<span class="p">}</span>
</code></pre></div> </div>
<p>and then point the <code class="highlighter-rouge">user_locale</code> configuration to that directory:</p>
<div class="language-json highlighter-rouge">
<div class="highlight"><pre class="highlight"><code><span class="s2">"user_locale"</span><span class="p">:</span><span class="w"> </span><span class="s2">"/opt/gancio/user_locale"</span><span class="w">
</span></code></pre></div> </div>
<p>Watch <a href="https://git.lattuga.net/cisti/gancio/src/master/locales">here</a> for a
list of strings you can override.<br>
<small><img class="emoji" title=":warning:" alt=":warning:" src="https://github.githubassets.com/images/icons/emoji/unicode/26a0.png" height="20" width="20"> Note that a restart is needed when you change
user_locale’s content.</small></p>
</li>
<li>
<h3 id="secret">Secret</h3>
......
......@@ -70,6 +70,14 @@
......@@ -111,6 +119,8 @@
<li class="navigation-list-item ">
<a href="https://gancio.org/setup/nginx" class="navigation-list-link">Nginx</a>
......@@ -132,6 +142,10 @@
</ul>
</li>
......@@ -172,7 +186,7 @@
<li class="navigation-list-item">
<a href="https://gancio.org/dev" class="navigation-list-link">Develop</a>
<a href="https://gancio.org/dev" class="navigation-list-link">Hacking</a>
</li>
......@@ -188,6 +202,16 @@
<li class="navigation-list-item">
<a href="https://gancio.org/instances" class="navigation-list-link">Instances</a>
</li>
</ul>
</nav>
......
......@@ -6,7 +6,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<title>Develop - Gancio</title>
<title>Hacking - Gancio</title>
......@@ -25,9 +25,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.6.1 -->
<title>Develop | Gancio</title>
<title>Hacking | Gancio</title>
<meta name="generator" content="Jekyll v3.8.6" />
<meta property="og:title" content="Develop" />
<meta property="og:title" content="Hacking" />
<meta property="og:locale" content="en_US" />
<meta name="description" content="A shared agenda for local communities" />
<meta property="og:description" content="A shared agenda for local communities" />
......@@ -35,7 +35,7 @@
<meta property="og:url" content="https://gancio.org/dev" />
<meta property="og:site_name" content="Gancio" />
<script type="application/ld+json">
{"@type":"WebPage","url":"https://gancio.org/dev","headline":"Develop","description":"A shared agenda for local communities","@context":"https://schema.org"}</script>
{"@type":"WebPage","url":"https://gancio.org/dev","headline":"Hacking","description":"A shared agenda for local communities","@context":"https://schema.org"}</script>
<!-- End Jekyll SEO tag -->
</head>
......@@ -70,6 +70,14 @@
......@@ -111,6 +119,8 @@
<li class="navigation-list-item ">
<a href="https://gancio.org/setup/nginx" class="navigation-list-link">Nginx</a>
......@@ -132,6 +142,10 @@
</ul>
</li>
......@@ -172,7 +186,7 @@
<li class="navigation-list-item active">
<a href="https://gancio.org/dev" class="navigation-list-link active">Develop</a>
<a href="https://gancio.org/dev" class="navigation-list-link active">Hacking</a>
</li>
......@@ -188,6 +202,16 @@
<li class="navigation-list-item">
<a href="https://gancio.org/instances" class="navigation-list-link">Instances</a>
</li>
</ul>
</nav>
......@@ -230,6 +254,7 @@
<li><a href="https://nuxtjs.org/">Nuxt.js</a></li>
<li>Vue.js</li>
<li>Express</li>
<li>Node.js</li>
<li>Sequelize</li>
<li>Element.ui</li>
</ul>
......
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<title>Migration - Gancio</title>
<link rel="shortcut icon" href="https://gancio.org/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="https://gancio.org/assets/css/just-the-docs.css">
<script type="text/javascript" src="https://gancio.org/assets/js/vendor/lunr.min.js"></script>
<script type="text/javascript" src="https://gancio.org/assets/js/just-the-docs.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Begin Jekyll SEO tag v2.6.1 -->
<title>Migration | Gancio</title>
<meta name="generator" content="Jekyll v3.8.6" />
<meta property="og:title" content="Migration" />
<meta property="og:locale" content="en_US" />
<meta name="description" content="A shared agenda for local communities" />
<meta property="og:description" content="A shared agenda for local communities" />
<link rel="canonical" href="https://gancio.org/dev/migration" />
<meta property="og:url" content="https://gancio.org/dev/migration" />
<meta property="og:site_name" content="Gancio" />
<script type="application/ld+json">
{"@type":"WebPage","url":"https://gancio.org/dev/migration","headline":"Migration","description":"A shared agenda for local communities","@context":"https://schema.org"}</script>
<!-- End Jekyll SEO tag -->
</head>
<body>
<div class="page-wrap">
<div class="side-bar">
<a href="https://gancio.org/" class="site-title fs-6 lh-tight">Gancio</a>
<span class="fs-3"><button class="js-main-nav-trigger navigation-list-toggle btn btn-outline" type="button" data-text-toggle="Hide">Menu</button></span>
<div class="navigation main-nav js-main-nav">
<nav role="navigation" aria-label="Main navigation">
<ul class="navigation-list">
<li class="navigation-list-item active">
<a href="https://gancio.org/404.html" class="navigation-list-link"></a>
</li>
<li class="navigation-list-item">
<a href="https://gancio.org/" class="navigation-list-link">Home</a>
</li>
<li class="navigation-list-item">
<a href="https://gancio.org/setup" class="navigation-list-link">Setup</a>
<ul class="navigation-list-child-list ">
<li class="navigation-list-item ">
<a href="https://gancio.org/setup/classic" class="navigation-list-link">Classic</a>
</li>
<li class="navigation-list-item ">
<a href="https://gancio.org/setup/docker" class="navigation-list-link">Docker</a>
</li>
<li class="navigation-list-item ">
<a href="https://gancio.org/setup/nginx" class="navigation-list-link">Nginx</a>
</li>
</ul>
</li>
<li class="navigation-list-item">
<a href="https://gancio.org/config" class="navigation-list-link">Configuration</a>