Commit 6db3836c authored by les's avatar les
Browse files

[doc] premonition, oauth

parent ff82780e
......@@ -23,6 +23,7 @@ gem "mini_magick"
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.6"
gem "jemoji"
gem "premonition", "~> 2.0.0"
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
......
......@@ -66,6 +66,7 @@ GEM
mini_portile2 (~> 2.4.0)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
premonition (2.0.0)
public_suffix (3.1.1)
rake (12.3.1)
rb-fsevent (0.10.3)
......@@ -95,6 +96,7 @@ DEPENDENCIES
jemoji
just-the-docs
mini_magick
premonition (~> 2.0.0)
tzinfo (~> 1.2)
tzinfo-data
wdm (~> 0.1.0)
......
......@@ -28,7 +28,7 @@ theme: "just-the-docs"
plugins:
- jekyll-feed
- jemoji
- premonition
search_enabled: true
......@@ -39,6 +39,8 @@ aux_links:
- https://framagit.org/les/gancio
"Forum":
- https://socialhub.activitypub.rocks/c/software/gancio
"Mastodon":
- https://mastodon.cisti.org/@gancio
......
......@@ -11,6 +11,8 @@
<link rel="shortcut icon" href="{{ "favicon.ico" | absolute_url }}" type="image/x-icon">
<link rel="stylesheet" href="{{ "/assets/css/just-the-docs.css" | absolute_url }}">
<link rel="stylesheet" href="{{ "/assets/css/style.css" | absolute_url }}">
<link rel="stylesheet" href="{{ "/assets/css/premonition.css" | absolute_url }}">
<link rel="stylesheet" href="{{ "/assets/css/fa.min.css" | absolute_url }}">
{% if site.search_enabled != nil %}
<script type="text/javascript" src="{{ "/assets/js/vendor/lunr.min.js" | absolute_url }}"></script>
......
......@@ -12,6 +12,8 @@
<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">
<link rel="stylesheet" href="https://gancio.org/assets/css/style.css">
<link rel="stylesheet" href="https://gancio.org/assets/css/premonition.css">
<link rel="stylesheet" href="https://gancio.org/assets/css/fa.min.css">
<script type="text/javascript" src="https://gancio.org/assets/js/vendor/lunr.min.js"></script>
......@@ -36,7 +38,7 @@
<meta property="og:url" content="https://gancio.org/404.html" />
<meta property="og:site_name" content="Gancio" />
<script type="application/ld+json">
{"@type":"WebPage","url":"https://gancio.org/404.html","headline":"Gancio","description":"A shared agenda for local communities with AP support","@context":"https://schema.org"}</script>
{"@type":"WebPage","headline":"Gancio","url":"https://gancio.org/404.html","description":"A shared agenda for local communities with AP support","@context":"https://schema.org"}</script>
<!-- End Jekyll SEO tag -->
</head>
......@@ -67,18 +69,6 @@
......@@ -98,6 +88,10 @@
<li class="navigation-list-item">
<a href="https://gancio.org/install" class="navigation-list-link">Install</a>
......@@ -124,10 +118,6 @@
<li class="navigation-list-item ">
<a href="https://gancio.org/install/nginx" class="navigation-list-link">Nginx</a>
......@@ -150,6 +140,10 @@
......@@ -173,6 +167,10 @@
<li class="navigation-list-item">
<a href="https://gancio.org/dev" class="navigation-list-link">Hacking</a>
......@@ -187,17 +185,13 @@
<li class="navigation-list-item ">
<a href="https://gancio.org/dev/locales" class="navigation-list-link">Support a new language</a>
</li>
<li class="navigation-list-item ">
<a href="https://gancio.org/dev/migration" class="navigation-list-link">Migration</a>
<a href="https://gancio.org/dev/structure" class="navigation-list-link">Project Structure</a>
</li>
......@@ -205,9 +199,11 @@
<li class="navigation-list-item ">
<a href="https://gancio.org/dev/structure" class="navigation-list-link">Project Structure</a>
<a href="https://gancio.org/dev/oauth" class="navigation-list-link">OAuth</a>
</li>
......@@ -217,9 +213,11 @@
<li class="navigation-list-item ">
<a href="https://gancio.org/dev/locales" class="navigation-list-link">Internationalization</a>
</li>
......@@ -248,6 +246,10 @@
<li class="navigation-list-item">
<a href="https://gancio.org/about" class="navigation-list-link">About</a>
......@@ -260,7 +262,7 @@
<li class="navigation-list-item">
<a href="https://gancio.org/federation" class="navigation-list-link">Federation</a>
<a href="https://gancio.org/contacts" class="navigation-list-link">Contacts</a>
</li>
......@@ -270,7 +272,7 @@
<li class="navigation-list-item">
<a href="https://gancio.org/oauth" class="navigation-list-link">OAuth</a>
<a href="https://gancio.org/federation" class="navigation-list-link">Federation</a>
</li>
......@@ -313,7 +315,9 @@
<li class="d-inline-block my-0 mr-2"><a href="https://framagit.org/les/gancio">Source</a></li>
<li class="d-inline-block my-0"><a href="https://socialhub.activitypub.rocks/c/software/gancio">Forum</a></li>
<li class="d-inline-block my-0 mr-2"><a href="https://socialhub.activitypub.rocks/c/software/gancio">Forum</a></li>
<li class="d-inline-block my-0"><a href="https://mastodon.cisti.org/@gancio">Mastodon</a></li>
</ul>
......
......@@ -12,6 +12,8 @@
<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">
<link rel="stylesheet" href="https://gancio.org/assets/css/style.css">
<link rel="stylesheet" href="https://gancio.org/assets/css/premonition.css">
<link rel="stylesheet" href="https://gancio.org/assets/css/fa.min.css">
<script type="text/javascript" src="https://gancio.org/assets/js/vendor/lunr.min.js"></script>
......@@ -36,7 +38,7 @@
<meta property="og:url" content="https://gancio.org/about" />
<meta property="og:site_name" content="Gancio" />
<script type="application/ld+json">
{"@type":"WebPage","url":"https://gancio.org/about","headline":"About","description":"A shared agenda for local communities with AP support","@context":"https://schema.org"}</script>
{"@type":"WebPage","headline":"About","url":"https://gancio.org/about","description":"A shared agenda for local communities with AP support","@context":"https://schema.org"}</script>
<!-- End Jekyll SEO tag -->
</head>
......@@ -67,18 +69,6 @@
......@@ -98,6 +88,10 @@
<li class="navigation-list-item">
<a href="https://gancio.org/install" class="navigation-list-link">Install</a>
......@@ -124,10 +118,6 @@
<li class="navigation-list-item ">
<a href="https://gancio.org/install/nginx" class="navigation-list-link">Nginx</a>
......@@ -150,6 +140,10 @@
......@@ -173,6 +167,10 @@
<li class="navigation-list-item">
<a href="https://gancio.org/dev" class="navigation-list-link">Hacking</a>
......@@ -187,17 +185,13 @@
<li class="navigation-list-item ">
<a href="https://gancio.org/dev/locales" class="navigation-list-link">Support a new language</a>
</li>
<li class="navigation-list-item ">
<a href="https://gancio.org/dev/migration" class="navigation-list-link">Migration</a>
<a href="https://gancio.org/dev/structure" class="navigation-list-link">Project Structure</a>
</li>
......@@ -205,9 +199,11 @@
<li class="navigation-list-item ">
<a href="https://gancio.org/dev/structure" class="navigation-list-link">Project Structure</a>
<a href="https://gancio.org/dev/oauth" class="navigation-list-link">OAuth</a>
</li>
......@@ -217,9 +213,11 @@
<li class="navigation-list-item ">
<a href="https://gancio.org/dev/locales" class="navigation-list-link">Internationalization</a>
</li>
......@@ -248,6 +246,10 @@
<li class="navigation-list-item active">
<a href="https://gancio.org/about" class="navigation-list-link active">About</a>
......@@ -260,7 +262,7 @@
<li class="navigation-list-item">
<a href="https://gancio.org/federation" class="navigation-list-link">Federation</a>
<a href="https://gancio.org/contacts" class="navigation-list-link">Contacts</a>
</li>
......@@ -270,7 +272,7 @@
<li class="navigation-list-item">
<a href="https://gancio.org/oauth" class="navigation-list-link">OAuth</a>
<a href="https://gancio.org/federation" class="navigation-list-link">Federation</a>
</li>
......@@ -313,7 +315,9 @@
<li class="d-inline-block my-0 mr-2"><a href="https://framagit.org/les/gancio">Source</a></li>
<li class="d-inline-block my-0"><a href="https://socialhub.activitypub.rocks/c/software/gancio">Forum</a></li>
<li class="d-inline-block my-0 mr-2"><a href="https://socialhub.activitypub.rocks/c/software/gancio">Forum</a></li>
<li class="d-inline-block my-0"><a href="https://mastodon.cisti.org/@gancio">Mastodon</a></li>
</ul>
......
......@@ -10,3 +10,12 @@
.navigation-list-item a:hover {
color: black;
}
html, body {
font-family: sans-serif;
}
.page-content h1:first-of-type {
font-weight: 500;
}
\ No newline at end of file
......@@ -29,66 +29,66 @@
},
"4": {
"id": "4",
"title": "Contacts",
"content": "Contacts :elephant: Mastodon ⇒ @gancio@mastodon.cisti.org",
"url": "https://gancio.org/contacts",
"relUrl": "/contacts"
},
"5": {
"id": "5",
"title": "Debian",
"content": "Debian installation Install Node.js &amp; yarn (from root) curl -sL https://deb.nodesource.com/setup_12.x | bash - apt-get install -y nodejs curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - echo &quot;deb https://dl.yarnpkg.com/debian/ stable main&quot; &gt; /etc/apt/sources.list.d/yarn.list apt-get update &amp;&amp; apt-get install yarn source Install Gancio yarn global add gancio --prod Setup with postgreSQL (optional as you can choose sqlite) apt-get install postgresql # Create the database su postgres -c psql postgres=# create database gancio; postgres=# create user gancio with encrypted password &#39;gancio&#39;; postgres=# grant all privileges on database gancio to gancio; Create a user to run gancio from adduser gancio su gancio Launch interactive setup gancio setup --config config.json Start gancio start --config config.json Point your web browser to http://localhost:13120 or where you selected during setup. Setup nginx as a proxy To deploy gancio in production you should use something like pm2: sudo yarn global add pm2 pm2 start gancio -- --config config.json # Run this command to run your application as a service and automatically restart after a reboot: pm2 startup # read the output! sudo pm2 startup -u gancio Upgrade sudo yarn global add gancio sudo service pm2 restart",
"url": "https://gancio.org/install/debian",
"relUrl": "/install/debian"
},
"5": {
"id": "5",
"6": {
"id": "6",
"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://framagit.org/les/gancio Install dependencies yarn Hacking yarn dev Please use the issue board and the forum to discuss any modification.",
"url": "https://gancio.org/dev",
"relUrl": "/dev"
},
"6": {
"id": "6",
"7": {
"id": "7",
"title": "Docker",
"content": "Initial setup Use sqlite Use postgreSQL Start gancio Upgrade Initial setup You do not need to clone the full repo as we distribute gancio via npm. A Dockerfile and a docker-compose.yml are the only files needed. Create a directory where everything related to gancio is stored (db, images, config) mkdir /opt/gancio cd /opt/gancio note that you can choose a different directory. Use sqlite Download docker-compose.yml and Dockerfile wget https://gancio.org/docker/Dockerfile wget https://gancio.org/docker/sqlite/docker-compose.yml Create an empty db and config (this is needed) touch config.json db.sqlite mkdir user_locale Build docker image and launch interactive setup in one step docker-compose build docker-compose run --rm gancio gancio setup --docker --db=sqlite Use postgreSQL Download docker-compose.yml and Dockerfile wget https://gancio.org/docker/Dockerfile wget https://gancio.org/docker/postgres/docker-compose.yml Create an empty configuration (this is needed) touch config.json mkdir user_locale Build docker image and launch interactive setup in one step docker-compose build docker-compose run --rm gancio gancio setup --docker --db=postgres Start gancio Run your container docker-compose up -d Look at logs with docker-compose logs Setup nginx as a proxy Point your web browser to http://localhost:13120 or where you specified during setup and enjoy :tada: You can edit config.json file and restart the container on your needs, see Configuration for more details. Upgrade cd /opt/gancio docker-compose up -d --no-deps --build",
"url": "https://gancio.org/install/docker",
"relUrl": "/install/docker"
},
"7": {
"id": "7",
"8": {
"id": "8",
"title": "Federation",
"content": "Federation Each instance has only one AP Actor that publishes each event. We are considering the introduction of other “Actor” but they will not be linked to users, rather to places or tags/categories. There are no personal homes with a timeline of people I follow, everyone has a sort of local timeline of the instance, it’s an anti filter-bubble feature. Events are not published with the type Event but with type Note because we wanted to add the possibility to interact with events from mastodon instances (boost / bookmark and “comments” that we call resources because we don’t want it to become a place of debate, but more a place where to keep a historical memory of events, e.g. an audio recording of a talk). When mastodon will support Event object type we will change for sure.",
"url": "https://gancio.org/federation",
"relUrl": "/federation"
},
"8": {
"id": "8",
"9": {
"id": "9",
"title": "Home",
"content": "Gancio A shared agenda for local communities. Get started now Demo Source Some relevant key features: Focus on content not on people: nowhere on gancio appears the identity of who published the event, not even under a nickname, not even to administrators (except in the db). This is not an ego-friendly platform. Visitors first. We do not want logged user to get more features than random visitor. We do not want users to register, except to publish events and even in this case you can publish an anonymous event. Anonymous events: optionally a visitor can create events without being registered (an administrator has to confirm them) We are not interested in making hits so we export events in many ways, via RSS feeds, via global or individual ics, incorporating lists of events or single event via iframe on other websites. Very easy UI Multidays events support (festival, conferences…) Recurrent events support (each monday, each two monday, each monday and friday, each two saturday, etc.) Filters events for tags or places RSS and ICS export (with filters) embeddable iframe (example) boost / bookmark / comment events from the fediverse! Lot of configurations available (user registration open/close, enable federation, enable recurrent events) License Gancio is distributed by an AGPL-3.0 Licence.",
"content": "ancio A shared agenda for local communities. Get started now Demo Source Some relevant key features: Focus on content not on people: nowhere on gancio appears the identity of who published the event, not even under a nickname, not even to administrators (except in the db). This is not an ego-friendly platform. Visitors first. We do not want logged user to get more features than random visitor. We do not want users to register, except to publish events and even in this case you can publish an anonymous event. Anonymous events: optionally a visitor can create events without being registered (an administrator has to confirm them) We are not interested in making hits so we export events in many ways, via RSS feeds, via global or individual ics, incorporating lists of events or single event via iframe on other websites and via AP Very easy UI Multidays events support (festival, conferences…) Recurrent events support (each monday, each two monday, each monday and friday, each two saturday, etc.) Filters events for tags or places RSS and ICS export (with filters) embeddable iframe (example) boost / bookmark / comment events from the fediverse! Lot of configurations available (user registration open/close, enable federation, enable recurrent events) License Gancio is distributed by an AGPL-3.0 Licence.",
"url": "https://gancio.org/",
"relUrl": "/"
},
"9": {
"id": "9",
"10": {
"id": "10",
"title": "Install",
"content": "Install (production) Install on Debian Install using docker Post installation Nginx as a proxy If you wanna hack or run the current develop release take a look at Hacking &amp; contribute",
"url": "https://gancio.org/install",
"relUrl": "/install"
},
"10": {
"id": "10",
"11": {
"id": "11",
"title": "Instances",
"content": "Instances gancio.cisti.org (Torino, Italy) lapunta.org (Firenze, Italy)",
"content": "Instances gancio.cisti.org (Torino, Italy) lapunta.org (Firenze, Italy) Do you want your instance to appear here? Write us.",
"url": "https://gancio.org/instances",
"relUrl": "/instances"
},
"11": {
"id": "11",
"title": "Support a new language",
"content": "Add a new locale watch this commit",
"url": "https://gancio.org/dev/locales",
"relUrl": "/dev/locales"
},
"12": {
"id": "12",
"title": "Migration",
"content": "If you need to modify the db’s structure while hacking, just change server/api/models/ and remember to create a migration, to understand how things works check the sequelize documentation",
"url": "https://gancio.org/dev/migration",
"relUrl": "/dev/migration"
"title": "Internationalization",
"content": "Internationalization We’re self-hosting an instance of weblate you can use to help us with translations.",
"url": "https://gancio.org/dev/locales",
"relUrl": "/dev/locales"
},
"13": {
"id": "13",
......@@ -100,9 +100,9 @@
"14": {
"id": "14",
"title": "OAuth",
"content": "OAuth An open standard for token-based authentication and authorization on the Internet. Gancio supports OAuth 2.0, an authorization framework described in RFC 6749 that allows third-party applications to obtain limited access to an HTTP service on behalf of a resource owner, through the use of a standardized authorization flow that generates a client access token to be used with HTTP requests. To obtain an OAuth token for a Gancio instance, make sure that you allow your users to specify the domain they want to connect to before login. Use that domain to acquire a client id/secret and then proceed with normal OAuth 2. Create client Create a new application to obtain OAuth2 credentials. POST /api/client Request parameters client_name string A name for your application redirect_uri string Where the user should be redirected after authorization scopes string Space separated list of scopes. If none is provided, defaults to write as it’s the only supported scope! website string A URL to the homepage of your app Example curl -X POST -d &#39;client_name=Wordpress Event Manager&#39; -d &#39;redirect_uri=https://noblogs.org/&#39; -d &#39;website=https://myapp.example&#39; http://localhost:13120/api/client Returns Application, with client_id and client_secret { &quot;name&quot; : &quot;Wordpress Event Manager&quot;, &quot;scopes&quot; : &quot;write&quot;, &quot;website&quot; : &quot;https://myapp.example&quot;, &quot;client_secret&quot; : &quot;909029fa12797e6bdfb5baf5e379675dfa4e3ad4&quot;, &quot;redirect_uri&quot; : &quot;https://noblogs.org&quot;, &quot;client_id&quot; : &quot;0f377e34b2aaf517f7db534f32d26b0dd938fb6d&quot; } List of scopes write Grant access to add/update events. Authorize a user Displays an authorization form to the user. If approved, it will create and return an authorization code, then redirect to the desired redirect_uri. The authorization code can be used while requesting a token to obtain access to user-level methods. GET /authorize Request parameters response_type string Should be set equal to code redirect_uri string Where the user should be redirected after authorization scope string Should be write client_id string Client ID, obtained during app registration.",
"url": "https://gancio.org/oauth",
"relUrl": "/oauth"
"content": "BETA FEATUREExpect bad behavior and open issues OAuth An open standard for token-based authentication and authorization on the Internet. Gancio supports OAuth 2.0, an authorization framework described in RFC 6749 that allows third-party applications to obtain limited access to an HTTP service on behalf of a resource owner, through the use of a standardized authorization flow that generates a client access token to be used with HTTP requests. To obtain an OAuth token for a Gancio instance, make sure that you allow your users to specify the domain they want to connect to before login. Use that domain to acquire a client id/secret and then proceed with normal OAuth 2. Create client Create a new application to obtain OAuth2 credentials. POST /api/client Request parameters client_name string A name for your application redirect_uris string Where the user should be redirected after authorization scopes string Space separated list of scopes. If none is provided, defaults to event:write as it’s the only supported scope! website string A URL to the homepage of your app Example curl -X POST -d &#39;client_name=Wordpress Event Manager&#39; -d &#39;redirect_uris=https://noblogs.org/&#39; -d &#39;website=https://myapp.example&#39; http://localhost:13120/api/client Returns Application, with client_id and client_secret { &quot;name&quot; : &quot;Wordpress Event Manager&quot;, &quot;scopes&quot; : &quot;event:write&quot;, &quot;website&quot; : &quot;https://myapp.example&quot;, &quot;client_secret&quot; : &quot;909029fa12797e6bdfb5baf5e379675dfa4e3ad4&quot;, &quot;redirect_uris&quot; : &quot;https://noblogs.org&quot;, &quot;client_id&quot; : &quot;0f377e34b2aaf517f7db534f32d26b0dd938fb6d&quot; } List of scopes event:write Grant access to add/update events. Authorize a user Displays an authorization form to the user. If approved, it will create and return an authorization code, then redirect to the desired redirect_uri. The authorization code can be used while requesting a token to obtain access to user-level methods. GET /authorize Request parameters response_type string Should be set equal to code redirect_uri string Where the user should be redirected after authorization scope string Should be event:write client_id string client_id, obtained during app registration. Obtain a token POST /oauth/token Request parameters client_id string client_id obtained during client registration client_secret string client_secret obtained during client registration scope string Should be event:write grant_type string Set equal to authorization_code code string A user authorization code, obtained via /authorize",
"url": "https://gancio.org/dev/oauth",
"relUrl": "/dev/oauth"
},
"15": {
"id": "15",
......
......@@ -12,6 +12,8 @@
<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">
<link rel="stylesheet" href="https://gancio.org/assets/css/style.css">
<link rel="stylesheet" href="https://gancio.org/assets/css/premonition.css">
<link rel="stylesheet" href="https://gancio.org/assets/css/fa.min.css">
<script type="text/javascript" src="https://gancio.org/assets/js/vendor/lunr.min.js"></script>
......@@ -36,7 +38,7 @@
<meta property="og:url" content="https://gancio.org/changelog" />
<meta property="og:site_name" content="Gancio" />
<script type="application/ld+json">
{"@type":"WebPage","url":"https://gancio.org/changelog","headline":"Changelog","description":"A shared agenda for local communities with AP support","@context":"https://schema.org"}</script>
{"@type":"WebPage","headline":"Changelog","url":"https://gancio.org/changelog","description":"A shared agenda for local communities with AP support","@context":"https://schema.org"}</script>
<!-- End Jekyll SEO tag -->
</head>
......@@ -67,18 +69,6 @@
......@@ -98,6 +88,10 @@
<li class="navigation-list-item">
<a href="https://gancio.org/install" class="navigation-list-link">Install</a>
......@@ -124,10 +118,6 @@
<li class="navigation-list-item ">
<a href="https://gancio.org/install/nginx" class="navigation-list-link">Nginx</a>
......@@ -150,6 +140,10 @@
......@@ -173,6 +167,10 @@
<li class="navigation-list-item">
<a href="https://gancio.org/dev" class="navigation-list-link">Hacking</a>
......@@ -187,17 +185,13 @@
<li class="navigation-list-item ">
<a href="https://gancio.org/dev/locales" class="navigation-list-link">Support a new language</a>
</li>
<li class="navigation-list-item ">
<a href="https://gancio.org/dev/migration" class="navigation-list-link">Migration</a>
<a href="https://gancio.org/dev/structure" class="navigation-list-link">Project Structure</a>
</li>
......@@ -205,9 +199,11 @@
<li class="navigation-list-item ">
<a href="https://gancio.org/dev/structure" class="navigation-list-link">Project Structure</a>
<a href="https://gancio.org/dev/oauth" class="navigation-list-link">OAuth</a>
</li>
......@@ -217,9 +213,11 @@
<li class="navigation-list-item ">
<a href="https://gancio.org/dev/locales" class="navigation-list-link">Internationalization</a>
</li>
......@@ -248,6 +246,10 @@