From cda05832d045c6a108e89818596f795bdfc216ac Mon Sep 17 00:00:00 2001 From: lesion Date: Tue, 10 May 2022 11:03:24 +0200 Subject: [PATCH] minor on docs --- docs/_drafts/admin.md | 36 ++++++++++++--- docs/index.md | 4 +- docs/usage/embed.md | 100 ++++++++++++++++++++++++++++++++++++++++++ docs/usage/usage.md | 13 ++++++ package.json | 2 +- 5 files changed, 145 insertions(+), 10 deletions(-) create mode 100644 docs/usage/embed.md create mode 100644 docs/usage/usage.md diff --git a/docs/_drafts/admin.md b/docs/_drafts/admin.md index 1884e866..ce8852d4 100644 --- a/docs/_drafts/admin.md +++ b/docs/_drafts/admin.md @@ -1,19 +1,41 @@ --- layout: default title: Admin -permalink: /admin -nav_order: 5 +permalink: /usage/admin +nav_order: 1 +parent: Usage --- -# Admin -{: .no_toc } +### CLI + +#### Manage accounts + + +```bash +$ gancio accounts + +Manage accounts + +Commands: + gancio accounts list List all accounts + +``` + +#### List accounts + +``` +$ gancio accounts list +📅 gancio - v1.4.3 - A shared agenda for local communities (nodejs: v16.13.0) +> Reading configuration from: ./config.json + +1 admin: true enabled: true email: admin +2 admin: false enabled: true email: lesion@autistici.org +``` -1. TOC -{:toc} ## Basics ## Add user ## Enable registration ## Confirm registration -## Confirm event +## Confirm event \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index 159abe1d..bce7d812 100644 --- a/docs/index.md +++ b/docs/index.md @@ -24,14 +24,14 @@ nowhere on gancio does the identity of who posted an event appear, not even unde - **Anonymous events**: optionally a visitor can create events without being registered (an administrator must confirm them) -- **We don't care about making hits** so we export events in many ways: via RSS feeds, via global or individual ics, allowing you to embed list of events or single event via [iframe or webcomponent]({% link embed.md %}) on other websites, via [AP]({% link federation.md %}), [microdata](https://developer.mozilla.org/en-US/docs/Web/HTML/Microdata) and [microformat](https://developer.mozilla.org/en-US/docs/Web/HTML/microformats#h-event) +- **We don't care about making hits** so we export events in many ways: via RSS feeds, via global or individual ics, allowing you to embed list of events or single event via [iframe or webcomponent]({% link usage/embed.md %}) on other websites, via [AP]({% link federation.md %}), [microdata](https://developer.mozilla.org/en-US/docs/Web/HTML/Microdata) and [microformat](https://developer.mozilla.org/en-US/docs/Web/HTML/microformats#h-event) - Very easy UI - Multi-day events (festival, conferences...) - Recurring events (each monday, each two monday, each monday and friday, each two saturday, etc.) - Filter events for tags or places - RSS and ICS export (with filters) -- embed your events in your website with [webcomponents]({% link embed.md %}) or iframe ([example](https://gancio.cisti.org/embed/list?title=Upcoming events)) +- embed your events in your website with [webcomponents]({% link usage/embed.md %}) or iframe ([example](https://gancio.cisti.org/embed/list?title=Upcoming events)) - boost / bookmark / comment events from the fediverse! - Lot of configurations available (dark/light theme, user registration open/close, enable federation, enable recurring events) diff --git a/docs/usage/embed.md b/docs/usage/embed.md new file mode 100644 index 00000000..0251dddc --- /dev/null +++ b/docs/usage/embed.md @@ -0,0 +1,100 @@ +--- +layout: default +title: Embed events in webpages +permalink: /usage/embed +nav_order: 1 +parent: Usage +--- + + + +## Embed a single event or a list of events in your webpage +{: .no_toc } + +You can embed a list of filtered events or a specific event card in your webpage using a classic old-school `iframe` or a shiny new webcomponent. + +1. TOC +{:toc} +## Webcomponents +[Webcomponents](https://www.webcomponents.org/introduction) usage requires a small (~5kB gzipped) js script to be loaded in your page (note that you should use your instance name): +```html + +``` + +### Embed a single event +To embed an event in webpages you use `` custom element, you can copy the required code in **event's page > Embed > Copy**, should be like the following: + +```html + +``` + + + + + +### Embed event lists +You can also embed a list of events using `` custom element, you can copy the required code in **Export > List > Copy** + + +```html + + Gancio Events + +``` + + + + + + + + +Gancio Events + +> info "Customize" +> Note that you can modify the title (or completely remove it using an empty `title` param), +> you can limit the list to a maximum number of events using the `maxlength` parameter and filter events by `tags` or `places` using that parameters (it's easier using **gancio** than to explain it here) + + +## IFrame +You can also use the old iframe method + + +```html + +``` + + +## Wordpress +To embed an event or a list of events into a [WordPress](https://wordpress.com) website you can use the [WPGancio](https://wordpress.org/plugins/wpgancio/) plugin, this allows you to use webcomponents and shortcodes and automatically includes the needed script in each page and post. \ No newline at end of file diff --git a/docs/usage/usage.md b/docs/usage/usage.md new file mode 100644 index 00000000..a5ae1862 --- /dev/null +++ b/docs/usage/usage.md @@ -0,0 +1,13 @@ +--- +layout: default +title: Usage +permalink: /usage +nav_order: 1 +has_children: true +--- + +## Usage + +ehmmm, help needed here :smile: feel free to send a PR => [here](https://framagit.org/les/gancio/tree/master/docs) + + diff --git a/package.json b/package.json index 9dfe32de..6bcdde0a 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "doc:dev": "cd docs && bundle exec jekyll s --drafts", "migrate": "NODE_ENV=production sequelize db:migrate", "migrate:dev": "sequelize db:migrate", - "build:wc": "cd webcomponents; yarn build:lib; cd .." + "build:wc": "cd webcomponents; yarn build:lib; cp dist/gancio-events.es.js ../wp-plugin/js/; cp dist/gancio-events.es.js ../assets/; cp dist/gancio-events.es.js ../docs/assets/js/" }, "files": [ "server/",