diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..18d6469 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +name: CI Riverlabs + +on: + push: + branches: + - main + pull_request: + workflow_dispatch: + workflow_call: + +jobs: + test-docs: + timeout-minutes: 15 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-python@v6 + with: + python-version: 3.14 + cache: pip + cache-dependency-path: requirements.txt + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Test the docs built correctly + run: | + mkdocs build -f config/en/mkdocs.yml + mkdocs build -f config/es/mkdocs.yml diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml new file mode 100644 index 0000000..744689e --- /dev/null +++ b/.github/workflows/deploy-docs.yml @@ -0,0 +1,57 @@ +name: Deploy MkDocs (Multi-language) + +on: + push: + branches: + - main + +permissions: + contents: write + +jobs: + test: + uses: ./.github/workflows/ci.yml + + docs: + needs: test + timeout-minutes: 15 + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Configure Git Credentials + run: | + git config user.name github-actions[bot] + git config user.email 41898282+github-actions[bot]@users.noreply.github.com + + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: 3.14 + cache: pip + cache-dependency-path: requirements.txt + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + # Build each language into its own subdirectory + - name: Build docs + run: | + mkdocs build -f config/en/mkdocs.yml + mkdocs build -f config/es/mkdocs.yml + + # Copy the root redirect index.html into the site folder + - name: Copy root index redirect + run: cp index.html site/index.html + + # Deploy the entire site/ folder to gh-pages + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./site + publish_branch: gh-pages diff --git a/config/en/mkdocs.yml b/config/en/mkdocs.yml new file mode 100644 index 0000000..4a5c559 --- /dev/null +++ b/config/en/mkdocs.yml @@ -0,0 +1,50 @@ +site_name: Riverlabs user manual +site_url: https://github.com/ICHydro/Riverlabs + +docs_dir: "../../docs/en" # Where to find the English markdown files +site_dir: "../../site/en" # Where to put the English HTML files + +theme: + name: material + custom_dir: "../../overrides/" + Language: en + +plugins: + - search: + lang: en # Set language for search + - section-index + - glightbox + +extra: # Language Selection + alternate: + # Switch to English + - name: English + link: /riverlabs/en/ + lang: en + # Switch to Spanish + - name: Español + link: /riverlabs/es/ + lang: es + +markdown_extensions: + - tables + - toc: + permalink: "¤" + +extra_css: + - "assets/stylesheets/custom.css" + +nav: + - Getting started: + - Overview: index.md + - Technical specifications: techspec.md + - Setting up: start.md + - Programming the logger: + - The Arduino ecosystem: arduino.md + - Uploading code with the Arduino IDE: upload.md + - Data storage and telemetry: + - SD card storage: SDcard.md + - Xbee 3G Modem: xbee3G.md + - Thingsboard: thingsboard.md + - Installation: + - Installation: installation.md \ No newline at end of file diff --git a/config/es/mkdocs.yml b/config/es/mkdocs.yml new file mode 100644 index 0000000..84dd938 --- /dev/null +++ b/config/es/mkdocs.yml @@ -0,0 +1,50 @@ +site_name: Riverlabs user manual +site_url: https://github.com/ICHydro/Riverlabs + +docs_dir: "../../docs/es" # Where to find the Spanish markdown files +site_dir: "../../site/es" # Where to put the Spanish HTML files + +theme: + name: material + custom_dir: "../../overrides/" + Language: es + +plugins: + - search: + lang: es # Set language for search + - section-index + - glightbox + +extra: # Language Selection + alternate: + # Switch to English + - name: English + link: /riverlabs/en/ + lang: en + # Switch to Spanish + - name: Español + link: /riverlabs/es/ + lang: es + +markdown_extensions: + - tables + - toc: + permalink: "¤" + +extra_css: + - "assets/stylesheets/custom.css" + +nav: + - Inicio: + - Resumen: index.md + - Especificaciones técnicas: techspec.md + - Necesidades de hardware y software: start.md + - Programación del logger: + - El ecosistema Arduino: arduino.md + - Subir codigo con arduino: upload.md + - Almacenamiento de datos y telemetría: + - Almacenamiento en tarjeta SD: SDcard.md + - El modem XBee 3G: xbee3G.md + - Thingsboard: thingsboard.md + - Instalación: + - Instalación: installation.md \ No newline at end of file diff --git a/docs/.gitignore b/docs/.gitignore deleted file mode 100644 index c46da9a..0000000 --- a/docs/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -_site/ -.sass-cache/ -.jekyll-metadata -_pdf -.DS_Store -.idea -vendor/ -.bundle/ diff --git a/docs/.gitlab-ci.yml b/docs/.gitlab-ci.yml deleted file mode 100644 index 7167efd..0000000 --- a/docs/.gitlab-ci.yml +++ /dev/null @@ -1,26 +0,0 @@ -image: ruby:2.3 - -variables: - JEKYLL_ENV: production - -test: - stage: test - script: - - sh ./var/build.sh - - bundle exec jekyll build -d test - artifacts: - paths: - - test - except: - - master - -pages: - stage: deploy - script: - - sh ./var/build.sh - - bundle exec jekyll build -d public - artifacts: - paths: - - public - only: - - master diff --git a/docs/404.md b/docs/404.md deleted file mode 100644 index a7b58c0..0000000 --- a/docs/404.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: "Page Not Found" -search: exclude ---- - -Sorry, but the page you were trying to view does not exist. Try searching for it or looking at the URL to see if it looks correct. diff --git a/docs/Gemfile b/docs/Gemfile deleted file mode 100644 index 068a3b3..0000000 --- a/docs/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -# to publish on github page -gem 'github-pages' - -# to publish without github page -#gem "jekyll" - -gem 'jekyll-multiple-languages-plugin' - -gem "webrick", "~> 1.8" diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock deleted file mode 100644 index 45a67bf..0000000 --- a/docs/Gemfile.lock +++ /dev/null @@ -1,272 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - activesupport (7.1.2) - base64 - bigdecimal - concurrent-ruby (~> 1.0, >= 1.0.2) - connection_pool (>= 2.2.5) - drb - i18n (>= 1.6, < 2) - minitest (>= 5.1) - mutex_m - tzinfo (~> 2.0) - addressable (2.8.6) - public_suffix (>= 2.0.2, < 6.0) - base64 (0.2.0) - bigdecimal (3.1.5) - coffee-script (2.4.1) - coffee-script-source - execjs - coffee-script-source (1.11.1) - colorator (1.1.0) - commonmarker (0.23.10) - concurrent-ruby (1.2.2) - connection_pool (2.4.1) - dnsruby (1.70.0) - simpleidn (~> 0.2.1) - drb (2.2.0) - ruby2_keywords - em-websocket (0.5.3) - eventmachine (>= 0.12.9) - http_parser.rb (~> 0) - ethon (0.16.0) - ffi (>= 1.15.0) - eventmachine (1.2.7) - execjs (2.9.1) - faraday (2.7.12) - base64 - faraday-net_http (>= 2.0, < 3.1) - ruby2_keywords (>= 0.0.4) - faraday-net_http (3.0.2) - ffi (1.16.3) - forwardable-extended (2.6.0) - gemoji (3.0.1) - github-pages (228) - github-pages-health-check (= 1.17.9) - jekyll (= 3.9.3) - jekyll-avatar (= 0.7.0) - jekyll-coffeescript (= 1.1.1) - jekyll-commonmark-ghpages (= 0.4.0) - jekyll-default-layout (= 0.1.4) - jekyll-feed (= 0.15.1) - jekyll-gist (= 1.5.0) - jekyll-github-metadata (= 2.13.0) - jekyll-include-cache (= 0.2.1) - jekyll-mentions (= 1.6.0) - jekyll-optional-front-matter (= 0.3.2) - jekyll-paginate (= 1.1.0) - jekyll-readme-index (= 0.3.0) - jekyll-redirect-from (= 0.16.0) - jekyll-relative-links (= 0.6.1) - jekyll-remote-theme (= 0.4.3) - jekyll-sass-converter (= 1.5.2) - jekyll-seo-tag (= 2.8.0) - jekyll-sitemap (= 1.4.0) - jekyll-swiss (= 1.0.0) - jekyll-theme-architect (= 0.2.0) - jekyll-theme-cayman (= 0.2.0) - jekyll-theme-dinky (= 0.2.0) - jekyll-theme-hacker (= 0.2.0) - jekyll-theme-leap-day (= 0.2.0) - jekyll-theme-merlot (= 0.2.0) - jekyll-theme-midnight (= 0.2.0) - jekyll-theme-minimal (= 0.2.0) - jekyll-theme-modernist (= 0.2.0) - jekyll-theme-primer (= 0.6.0) - jekyll-theme-slate (= 0.2.0) - jekyll-theme-tactile (= 0.2.0) - jekyll-theme-time-machine (= 0.2.0) - jekyll-titles-from-headings (= 0.5.3) - jemoji (= 0.12.0) - kramdown (= 2.3.2) - kramdown-parser-gfm (= 1.1.0) - liquid (= 4.0.4) - mercenary (~> 0.3) - minima (= 2.5.1) - nokogiri (>= 1.13.6, < 2.0) - rouge (= 3.26.0) - terminal-table (~> 1.4) - github-pages-health-check (1.17.9) - addressable (~> 2.3) - dnsruby (~> 1.60) - octokit (~> 4.0) - public_suffix (>= 3.0, < 5.0) - typhoeus (~> 1.3) - html-pipeline (2.14.3) - activesupport (>= 2) - nokogiri (>= 1.4) - http_parser.rb (0.8.0) - i18n (1.14.1) - concurrent-ruby (~> 1.0) - jekyll (3.9.3) - addressable (~> 2.4) - colorator (~> 1.0) - em-websocket (~> 0.5) - i18n (>= 0.7, < 2) - jekyll-sass-converter (~> 1.0) - jekyll-watch (~> 2.0) - kramdown (>= 1.17, < 3) - liquid (~> 4.0) - mercenary (~> 0.3.3) - pathutil (~> 0.9) - rouge (>= 1.7, < 4) - safe_yaml (~> 1.0) - jekyll-avatar (0.7.0) - jekyll (>= 3.0, < 5.0) - jekyll-coffeescript (1.1.1) - coffee-script (~> 2.2) - coffee-script-source (~> 1.11.1) - jekyll-commonmark (1.4.0) - commonmarker (~> 0.22) - jekyll-commonmark-ghpages (0.4.0) - commonmarker (~> 0.23.7) - jekyll (~> 3.9.0) - jekyll-commonmark (~> 1.4.0) - rouge (>= 2.0, < 5.0) - jekyll-default-layout (0.1.4) - jekyll (~> 3.0) - jekyll-feed (0.15.1) - jekyll (>= 3.7, < 5.0) - jekyll-gist (1.5.0) - octokit (~> 4.2) - jekyll-github-metadata (2.13.0) - jekyll (>= 3.4, < 5.0) - octokit (~> 4.0, != 4.4.0) - jekyll-include-cache (0.2.1) - jekyll (>= 3.7, < 5.0) - jekyll-mentions (1.6.0) - html-pipeline (~> 2.3) - jekyll (>= 3.7, < 5.0) - jekyll-multiple-languages-plugin (1.8.0) - jekyll (>= 2.0, < 5.0) - jekyll-optional-front-matter (0.3.2) - jekyll (>= 3.0, < 5.0) - jekyll-paginate (1.1.0) - jekyll-readme-index (0.3.0) - jekyll (>= 3.0, < 5.0) - jekyll-redirect-from (0.16.0) - jekyll (>= 3.3, < 5.0) - jekyll-relative-links (0.6.1) - jekyll (>= 3.3, < 5.0) - jekyll-remote-theme (0.4.3) - addressable (~> 2.0) - jekyll (>= 3.5, < 5.0) - jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0) - rubyzip (>= 1.3.0, < 3.0) - jekyll-sass-converter (1.5.2) - sass (~> 3.4) - jekyll-seo-tag (2.8.0) - jekyll (>= 3.8, < 5.0) - jekyll-sitemap (1.4.0) - jekyll (>= 3.7, < 5.0) - jekyll-swiss (1.0.0) - jekyll-theme-architect (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-cayman (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-dinky (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-hacker (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-leap-day (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-merlot (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-midnight (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-minimal (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-modernist (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-primer (0.6.0) - jekyll (> 3.5, < 5.0) - jekyll-github-metadata (~> 2.9) - jekyll-seo-tag (~> 2.0) - jekyll-theme-slate (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-tactile (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-time-machine (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-titles-from-headings (0.5.3) - jekyll (>= 3.3, < 5.0) - jekyll-watch (2.2.1) - listen (~> 3.0) - jemoji (0.12.0) - gemoji (~> 3.0) - html-pipeline (~> 2.2) - jekyll (>= 3.0, < 5.0) - kramdown (2.3.2) - rexml - kramdown-parser-gfm (1.1.0) - kramdown (~> 2.0) - liquid (4.0.4) - listen (3.8.0) - rb-fsevent (~> 0.10, >= 0.10.3) - rb-inotify (~> 0.9, >= 0.9.10) - mercenary (0.3.6) - minima (2.5.1) - jekyll (>= 3.5, < 5.0) - jekyll-feed (~> 0.9) - jekyll-seo-tag (~> 2.1) - minitest (5.20.0) - mutex_m (0.2.0) - nokogiri (1.18.9-x86_64-linux-gnu) - racc (~> 1.4) - octokit (4.25.1) - faraday (>= 1, < 3) - sawyer (~> 0.9) - pathutil (0.16.2) - forwardable-extended (~> 2.6) - public_suffix (4.0.7) - racc (1.8.1) - rb-fsevent (0.11.2) - rb-inotify (0.10.1) - ffi (~> 1.0) - rexml (3.3.9) - rouge (3.26.0) - ruby2_keywords (0.0.5) - rubyzip (2.3.2) - safe_yaml (1.0.5) - sass (3.7.4) - listen (~> 3.0) - sawyer (0.9.2) - addressable (>= 2.3.5) - faraday (>= 0.17.3, < 3) - simpleidn (0.2.1) - unf (~> 0.1.4) - terminal-table (1.8.0) - unicode-display_width (~> 1.1, >= 1.1.1) - typhoeus (1.4.1) - ethon (>= 0.9.0) - tzinfo (2.0.6) - concurrent-ruby (~> 1.0) - unf (0.1.4) - unf_ext - unf_ext (0.0.9.1) - unicode-display_width (1.8.0) - webrick (1.8.2) - -PLATFORMS - x86_64-linux - -DEPENDENCIES - github-pages - jekyll-multiple-languages-plugin - webrick (~> 1.8) - -BUNDLED WITH - 2.3.18 diff --git a/docs/_config.yml b/docs/_config.yml deleted file mode 100644 index ef4a3b7..0000000 --- a/docs/_config.yml +++ /dev/null @@ -1,133 +0,0 @@ -repository: ICHydro.github.io -baseurl: /Riverlabs - -output: web -# this property is useful for conditional filtering of content that is separate from the PDF. - -topnav_title: Riverlabs documentation -topnav_title_es: Documentación Riverlabs -# this appears on the top navigation bar next to the home button - -site_title: Riverlabs documentation -# this appears in the html browser tab for the site title (seen mostly by search engines, not users) - -company_name: Riverlabs Ltd -# this appears in the footer - -github_editme_path: -# if you're using Github, provide the basepath to the branch you've created for reviews, following the sample here. if not, leave this value blank. - -# gitlab_editme_path: tomjoht/documentation-theme-jekyll/blob/gh-pages/ -# if you're using GitLab, provide the basepath to the branch you've created for reviews, following the sample here. if not, leave this value blank. - -google_analytics: -# if you have google-analytics ID, put it in. if not, edit this value to blank. - -host: 127.0.0.1 -# the preview server used. Leave as is. - -port: 4000 -# the port where the preview is rendered. You can leave this as is unless you have other Jekyll builds using this same port that might cause conflicts. in that case, use another port such as 4006. - -exclude: - - .idea/ - - .gitignore - - vendor - - Gemfile - - Gemfile.lock -# these are the files and directories that jekyll will exclude from the build - -feedback_subject_line: Riverlabs docs - -feedback_email: info@riverlabs.uk -# used as a contact email for the Feedback link in the top navigation bar - -feedback_disable: true -# if you uncomment the previous line, the Feedback link gets removed - -# feedback_text: "Need help?" -# if you uncomment the previous line, it changes the Feedback text - -# feedback_link: "http://helpy.io/" -# if you uncomment the previous line, it changes where the feedback link points to - -highlighter: rouge -# library used for syntax highlighting - -markdown: kramdown -kramdown: - input: GFM - auto_ids: true - hard_wrap: false - syntax_highlighter: rouge - -# filter used to process markdown. note that kramdown differs from github-flavored markdown in some subtle ways - -collections: - tooltips: - output: false -# collections are declared here. this renders the content in _tooltips and processes it, but doesn't output it as actual files in the output unless you change output to true - -defaults: - - - scope: - path: "" - type: "pages" - values: - layout: "page" - comments: false - # if you don't want to use Commento.io and just hide comments, change true to false wherever you see the comments property - search: true - sidebar: home_sidebar - topnav: topnav - - - scope: - path: "" - type: "tooltips" - values: - layout: "page" - search: true - tooltip: true - - - - scope: - path: "" - type: "posts" - values: - layout: "post" - comments: false - # if you don't want to use Commento.io and just hide comments, change true to false wherever you see the comments property - search: true - sidebar: home_sidebar - topnav: topnav - -# these are defaults used for the frontmatter for these file types - -sidebars: -- home_sidebar -- mydoc_sidebar -- product1_sidebar -- product2_sidebar -- other - -description: "Documentation of the Riverlabs suite of sensors" -# the description is used in the feed.xml file - -# needed for sitemap.xml file only -# url: http://idratherbewriting.com -# baseurl: /documentation-theme-jekyll - - - - -github: [metadata] - -# internationalisation - -# Plugins -#plugins: -# - jekyll-multiple-languages-plugin - -#languages: ["en", "es"] -#exclude_from_localizations: ["javascript", "images", "css"] - diff --git a/docs/_data/alerts.yml b/docs/_data/alerts.yml deleted file mode 100644 index 157e162..0000000 --- a/docs/_data/alerts.yml +++ /dev/null @@ -1,15 +0,0 @@ -tip: '