From 4907f53dc2ce629e56327e53c25dcca6c3bf8420 Mon Sep 17 00:00:00 2001 From: les Date: Fri, 4 Jun 2021 15:52:35 +0200 Subject: [PATCH] improve docs --- docs/Gemfile.lock | 2 +- docs/_config.yml | 2 +- .../_includes/assets/js/zzzz-search-data.json | 72 +++++++++++++++++++ docs/_includes/head.html | 30 -------- docs/assets/css/style.css | 16 ----- docs/install/backup.md | 4 +- docs/install/configuration.md | 3 +- docs/install/docker.md | 20 +++--- docs/install/nginx.md | 2 +- 9 files changed, 88 insertions(+), 63 deletions(-) create mode 100644 docs/_includes/assets/js/zzzz-search-data.json delete mode 100644 docs/_includes/head.html delete mode 100644 docs/assets/css/style.css diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock index dcc6e635..7b774ec7 100644 --- a/docs/Gemfile.lock +++ b/docs/Gemfile.lock @@ -106,7 +106,7 @@ DEPENDENCIES jekyll-default-layout jekyll-feed jemoji - just-the-docs (~> 0.3.3) + just-the-docs mini_magick premonition tzinfo (~> 1.2) diff --git a/docs/_config.yml b/docs/_config.yml index 287b6a60..faada49b 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -17,7 +17,7 @@ title: Gancio email: lesion@autistici.org description: >- # this means to ignore newlines until "baseurl:" A shared agenda for local communities with AP support -baseurl: "/" # the subpath of your site, e.g. /blog +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/_includes/assets/js/zzzz-search-data.json b/docs/_includes/assets/js/zzzz-search-data.json new file mode 100644 index 00000000..848d3fbc --- /dev/null +++ b/docs/_includes/assets/js/zzzz-search-data.json @@ -0,0 +1,72 @@ +--- +permalink: /assets/js/search-data.json +--- +{ +{%- assign i = 0 -%} +{%- assign pages_array = | split: -%} +{%- assign pages_array = pages_array | push: site.html_pages -%} +{%- if site.just_the_docs.collections -%} + {%- for collection_entry in site.just_the_docs.collections -%} + {%- assign collection_key = collection_entry[0] -%} + {%- assign collection_value = collection_entry[1] -%} + {%- assign collection = site[collection_key] -%} + {%- if collection_value.search_exclude != true -%} + {%- assign pages_array = pages_array | push: collection -%} + {%- endif -%} + {%- endfor -%} +{%- endif -%} +{%- for pages in pages_array -%} + {%- for page in pages -%} + {%- if page.title and page.search_exclude != true -%} + {%- assign page_content = page.content -%} + {%- assign heading_level = site.search.heading_level | default: 2 -%} + {%- for j in (2..heading_level) -%} + {%- assign tag = '' -%} + {%- assign title = titleAndContent[0] | replace_first: '>', '

' | split: '

' -%} + {%- assign title = title[1] | strip_html -%} + {%- assign content = titleAndContent[1] -%} + {%- assign url = page.url -%} + {%- if title == page.title and parts[0] == '' -%} + {%- assign title_found = true -%} + {%- else -%} + {%- assign id = titleAndContent[0] -%} + {%- assign id = id | split: 'id="' -%} + {%- if id.size == 2 -%} + {%- assign id = id[1] -%} + {%- assign id = id | split: '"' -%} + {%- assign id = id[0] -%} + {%- capture url -%}{{ url | append: '#' | append: id }}{%- endcapture -%} + {%- endif -%} + {%- endif -%} + {%- unless i == 0 -%},{%- endunless -%} + "{{ i }}": { + "doc": {{ page.title | jsonify }}, + "title": {{ title | jsonify }}, + "content": {{ content | replace: ' - - - - {{ page.title }} - {{ site.title }} - - {% if page.description %} - - {% endif %} - - - - - - - - {% if site.search_enabled != nil %} - - {% endif %} - - - - - - - - - - {% seo %} - diff --git a/docs/assets/css/style.css b/docs/assets/css/style.css deleted file mode 100644 index 632592e0..00000000 --- a/docs/assets/css/style.css +++ /dev/null @@ -1,16 +0,0 @@ -/* .navigation-list-item { - font-size: 18px !important; - padding: 4px; -} - -html, body { - font-family: sans-serif; -} - -.page-content h1:first-of-type { - font-weight: 500; -} - -li { - margin-left: 10px; -} */ \ No newline at end of file diff --git a/docs/install/backup.md b/docs/install/backup.md index 38eea0e3..c10c5a19 100644 --- a/docs/install/backup.md +++ b/docs/install/backup.md @@ -1,7 +1,7 @@ --- layout: default title: Backup -permalink: /backup +permalink: /install/backup nav_order: 5 parent: Install --- @@ -9,7 +9,7 @@ parent: Install ## Backup The following commands should be valid for every setup (docker/debian/sqlite/postgres) but check your installation directory first. -This includes database, configuration, custom user locales, images and thumbnails for every release. +This includes database, configuration, custom user locales, logs, images and thumbnails. ```bash cd /opt/gancio/ # or /home/gancio or where your installation is diff --git a/docs/install/configuration.md b/docs/install/configuration.md index 7a3ae53b..45191ebf 100644 --- a/docs/install/configuration.md +++ b/docs/install/configuration.md @@ -1,7 +1,6 @@ --- -layout: default title: Configuration -permalink: /config +permalink: /install/config nav_order: 6 parent: Install --- diff --git a/docs/install/docker.md b/docs/install/docker.md index 8c5d06e7..f862e7d6 100644 --- a/docs/install/docker.md +++ b/docs/install/docker.md @@ -5,8 +5,8 @@ permalink: /install/docker parent: Install nav_order: 2 --- -## Table of contents -{: .no_toc .text-delta } +## Docker installation +{: .no_toc } 1. TOC {:toc} @@ -83,14 +83,14 @@ tail -f data/logs/gancio.log > error "Upgrade from a version < 1.0" > Since v1.0 our docker setup is changed and a new container has to be built: > -> - `cd /opt/gancio` -> - [Backup your data](/backup) -> - Download new `Dockerfile` => `wget https://gancio.org/docker/Dockerfile` -> - Download new `docker-compose.yml` (modify DB to sqlite or postgres)-> `wget https://gancio.org/docker//docker-compose.yml` -> - Build the new container `docker-compose build` -> - Extract your backup into `./data` => `mkdir data; tar xvzf gancio--backup.tgz -C data` -> - Stop your old container `docker-compose stop` -> - Start your new container `docker-compose up` +> 1. `cd /opt/gancio` +> 1. [Backup your data](/backup) +> 1. Download new `Dockerfile`
`wget https://gancio.org/docker/Dockerfile` +> 1. Download new `docker-compose.yml` (substitute \ to sqlite or postgres):
`wget https://gancio.org/docker//docker-compose.yml` +> 1. Build the new container `docker-compose build` +> 1. Extract your backup into `./data`
`mkdir data; tar xvzf gancio--backup.tgz -C data` +> 1. Stop your old container `docker-compose stop` +> 1. Start your new container `docker-compose up` ```bash diff --git a/docs/install/nginx.md b/docs/install/nginx.md index 9068b627..862b386d 100644 --- a/docs/install/nginx.md +++ b/docs/install/nginx.md @@ -1,6 +1,6 @@ --- layout: default -title: Nginx +title: Nginx setup permalink: /install/nginx parent: Install ---