-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
2,914 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# GeoSight is UNICEF's geospatial web-based business intelligence platform. | ||
# | ||
# Contact : [email protected] | ||
# | ||
# .. note:: This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU Affero General Public License as published by | ||
# the Free Software Foundation; either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# __author__ = '[email protected]' | ||
# __date__ = '13/06/2023' | ||
# __copyright__ = ('Copyright 2023, Unicef') | ||
|
||
name: 📖 Documentation | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- docs | ||
# Paths can be used to only trigger actions when you have edited certain files, such as a file within the /docs directory | ||
paths: | ||
- ".github/workflows/BuildMKDocsAndPublishToGithubPages.yml" | ||
- "docs/**.md" | ||
- "docs/**.py" | ||
- "docs/assets/**" | ||
# Allow manually running in the actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Deploy docs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout main from github | ||
uses: actions/checkout@v1 | ||
- name: Create Mkdocs Config 🚀 | ||
working-directory: ./docs | ||
run: ./create-mkdocs-html-config.sh | ||
- name: Deploy docs to github pages | ||
# This is where we get the material theme from | ||
uses: timlinux/mkdocs-deploy-gh-pages@master | ||
# Wrong | ||
#uses: timlinux/QGISAnimationWorkbench@main | ||
env: | ||
# Read this carefully: | ||
# https://github.com/marketplace/actions/deploy-mkdocs#building-with-github_token | ||
# The token is automatically generated by the GH Action | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BASE_DIRECTORY: docs | ||
CONFIG_FILE: docs/mkdocs.yml | ||
REQUIREMENTS: docs/requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
use nix | ||
layout python |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.idea | ||
.venv | ||
pdfs/ | ||
|
||
# mkdocs related | ||
mkdocs.yml | ||
templates/graphics.scss | ||
site/* | ||
|
||
#direnv for docs building | ||
.direnv | ||
# Autogenerated api docs | ||
src/developer/manual/*.md | ||
|
||
*.swp |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Building the documentation as a PDF | ||
|
||
## Install Dependencies | ||
|
||
You need to install these packages: | ||
|
||
```bash | ||
pip install mkdocs-with-pdf | ||
pip install mkdocs-material | ||
pip install mdx_gh_links | ||
pip install mkdocs-pdf-export-plugin | ||
``` | ||
|
||
## Building in a terminal | ||
|
||
> Note that whenever you add new sections to nav in the mkdocs.yml | ||
> (used for building the web version), you should apply those same | ||
> edits to mkdocs-pdf.yml if you want those new sections to appear | ||
> in the pdf too. | ||
```bash | ||
cd docs | ||
./build-docs-pdf.sh | ||
xdg-open Handbook.pdf | ||
``` | ||
|
||
## Building in VSCode | ||
|
||
If you are in VSCode, you can also just run the 'Compile PDF' task. The | ||
generated PDF will be placed in docs/pdfs/. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
# This is only intended for local | ||
# testing. See github workflows for | ||
# how this build is automated. | ||
|
||
# this will create mkdocs.yml | ||
./create-mkdocs-html-config.sh | ||
# and this will build the html site | ||
mkdocs build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
# This is only intended for local | ||
# testing. See github workflows for | ||
# how this build is automated. | ||
|
||
# this will create mkdocs.yml | ||
./create-mkdocs-pdf-config.sh | ||
# and this will build the PDF document | ||
mkdocs build > /tmp/document.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#! /usr/bin/env bash | ||
|
||
rm -rf .venv | ||
rm -rf site | ||
rm -rf __pycache__ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
# This script will assemble a mkdocs.yml | ||
# file with plugins section suitable for | ||
# html site generation. | ||
|
||
# This script is used both in manual | ||
# site compilation (via build-docs-html.sh) | ||
# and via the github workflow for | ||
# publishing the site to github pages | ||
# .github/workflows/BuildMKDocsAndPublishToGithubPages.yml | ||
|
||
cat mkdocs-base.yml > mkdocs.yml | ||
cat mkdocs-html.yml >> mkdocs.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
# This script will assemble a mkdocs.yml | ||
# file with plugins section suitable for | ||
# PDF site generation. | ||
|
||
# This script is used both in manual | ||
# site compilation (via build-docs-html.sh) | ||
# and via the github workflow for | ||
# publishing the site to github pages | ||
# .github/workflows/CompileMKDocsToPDF.yml | ||
|
||
cat mkdocs-base.yml > mkdocs.yml | ||
cat mkdocs-pdf.yml >> mkdocs.yml | ||
# This is a kludge: I could not figure out | ||
# how to reference image resources using a relative path in the scss... | ||
cat templates/graphics.scss.templ | sed "s?\[BASE_FOLDER\]?$PWD?g" > templates/graphics.scss |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#! /usr/bin/env python | ||
|
||
import shortuuid | ||
uuid = shortuuid.uuid() | ||
print (uuid) |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
with import <nixpkgs> { }; | ||
|
||
let | ||
# For packages pinned to a specific version | ||
pinnedHash = "933d7dc155096e7575d207be6fb7792bc9f34f6d"; | ||
pinnedPkgs = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/${pinnedHash}.tar.gz") { }; | ||
pythonPackages = pinnedPkgs.python3Packages; | ||
in pkgs.mkShell rec { | ||
name = "impurePythonEnv"; | ||
venvDir = "./.venv"; | ||
buildInputs = [ | ||
# A Python interpreter including the 'venv' module is required to bootstrap | ||
# the environment. | ||
pythonPackages.python | ||
|
||
# This executes some shell code to initialize a venv in $venvDir before | ||
# dropping into the shell | ||
|
||
# For PDF production in mkdocs | ||
pythonPackages.venvShellHook | ||
python311Packages.weasyprint | ||
pinnedPkgs.cairo | ||
pinnedPkgs.pango | ||
pinnedPkgs.gdk-pixbuf | ||
pinnedPkgs.glib | ||
pinnedPkgs.gtk2 | ||
# Those are dependencies that we would like to use from nixpkgs, which will | ||
# add them to PYTHONPATH and thus make them accessible from within the venv. | ||
pythonPackages.requests | ||
pythonPackages.pygobject3 | ||
# Doesnt work properly | ||
#python311Packages.cffi | ||
pinnedPkgs.gobject-introspection | ||
pinnedPkgs.gtk3 | ||
pinnedPkgs.taglib | ||
pinnedPkgs.openssl | ||
pinnedPkgs.git | ||
pinnedPkgs.libxml2 | ||
pinnedPkgs.libxslt | ||
pinnedPkgs.libzip | ||
pinnedPkgs.zlib | ||
pinnedPkgs.gnused | ||
pinnedPkgs.rpl | ||
]; | ||
|
||
# Run this command, only after creating the virtual environment | ||
postVenvCreation = '' | ||
unset SOURCE_DATE_EPOCH | ||
pip install -r requirements.txt | ||
''; | ||
|
||
shellHook = '' | ||
''; | ||
# Now we can execute any commands within the virtual environment. | ||
# This is optional and can be left out to run pip manually. | ||
postShellHook = '' | ||
# allow pip to install wheels | ||
unset SOURCE_DATE_EPOCH | ||
''; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
document$.subscribe(function () { | ||
var tables = document.querySelectorAll("article table:not([class])") | ||
tables.forEach(function (table) { | ||
new Tablesort(table) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
site_name: Cloud Native GIS | ||
site_description: "Project technical and user documentation." | ||
site_author: "Kartoza" | ||
docs_dir: ./src | ||
site_dir: ./site | ||
repo_name: "CloudNativeGIS" | ||
repo_url: "https://github.com/kartoza/CloudNativeGIS.git" | ||
edit_uri: "https://github.com/kartoza/CloudNativeGIS/blob/main/docs/" | ||
|
||
copyright: Kartoza and Contributors | ||
|
||
markdown_extensions: | ||
- attr_list # lets us resize images see https://github.com/mkdocs/mkdocs/issues/1678#issuecomment-455500757 | ||
- pymdownx.highlight: | ||
anchor_linenums: true | ||
- pymdownx.inlinehilite | ||
#- mdx_truly_sane_lists | ||
- toc: | ||
permalink: true | ||
#slugify: !!python/name:pymdownx.slugs.slugify | ||
- pymdownx.snippets: | ||
base_path: . | ||
- admonition | ||
- tables | ||
- pymdownx.details | ||
- pymdownx.caret | ||
- pymdownx.keys | ||
- pymdownx.mark | ||
- pymdownx.tilde | ||
- pymdownx.superfences: | ||
custom_fences: | ||
- name: mermaid | ||
class: mermaid | ||
format: !!python/name:pymdownx.superfences.fence_code_format | ||
- pymdownx.emoji: | ||
emoji_generator: !!python/name:materialx.emoji.to_svg | ||
emoji_index: !!python/name:materialx.emoji.twemoji | ||
|
||
nav: | ||
- Home: | ||
- index.md | ||
- Developers: | ||
- developer/index.md | ||
- Manual: developer/manual/index.md |
Oops, something went wrong.