diff --git a/.gitignore b/.gitignore index 332fe2a..1925133 100644 --- a/.gitignore +++ b/.gitignore @@ -24,4 +24,7 @@ yarn-debug.log* yarn-error.log* node_modules -.venv \ No newline at end of file +# in case we have a python env for ipynb experiments locally +.venv/ +__pycache__/ +*.pyc \ No newline at end of file diff --git a/docs/contributing/step-2/pygeoapi/deployment.md b/docs/contributing/step-2/pygeoapi/deployment.md index 51b6be9..792c66a 100644 --- a/docs/contributing/step-2/pygeoapi/deployment.md +++ b/docs/contributing/step-2/pygeoapi/deployment.md @@ -5,8 +5,6 @@ sidebar_position: 1 --- -import Tippy from '@tippyjs/react'; - # Running pygeoapi locally Before geoconnex can leverage your data, it must be exposed in a way that geoconnex can crawl it. @@ -27,13 +25,9 @@ Our fork of pygeoapi is most easily deployed with [Docker](https://www.docker.co Using Docker, you can spin up pygeoapi with one command. Once you have pygeoapi running, you can navigate to http://localhost:5000 to explore the frontend. - -
- ``` - docker run -p 5000:80 -it --rm internetofwater/pygeoapi - ``` -
-
+``` +docker run -p 5000:80 -it --rm internetofwater/pygeoapi +``` ## Running with a custom configuration @@ -48,19 +42,12 @@ Once you have explored the baseline configuration you can use git clone and depl - See the [pygeoapi docs](https://docs.pygeoapi.io/en/latest/configuration.html) for a list of all configuration options. 4. Run the container with a custom config. - -
``` git clone https://github.com/internetofwater/pygeoapi cd pygeoapi docker run -p 5000:80 -v $(pwd)/local.config.yml:/pygeoapi/local.config.yml -it --rm internetofwater/pygeoapi:latest ``` -
-
- - - :::tip If you wish to use docker-compose, view [the pygeoapi-geoconnex-examples repo](https://github.com/cgs-earth/pygeoapi-geoconnex-examples) for sample configuration diff --git a/docs/reference/data-formats/jsonld/exploration.md b/docs/playground/jsonld.md similarity index 87% rename from docs/reference/data-formats/jsonld/exploration.md rename to docs/playground/jsonld.md index 9cd3e43..4d1bbfa 100644 --- a/docs/reference/data-formats/jsonld/exploration.md +++ b/docs/playground/jsonld.md @@ -1,7 +1,6 @@ --- - title: "JSON-LD Playground" -sidebar_position: 2 +hide_title: true --- diff --git a/docs/playground/templating.md b/docs/playground/templating.md new file mode 100644 index 0000000..f1354d2 --- /dev/null +++ b/docs/playground/templating.md @@ -0,0 +1,42 @@ +--- +title: "Jinja templating" +hide_title: true +--- + +import Playground from '@site/src/components/Playground'; + + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + + + + + + + + +
+Templating Overview +
+ +This page allows you to explore templating JSON-LD with Jinja so that it is easier to [contribute and expose your data](/docs/contributing/overview.md) for Geoconnex. + +- The left editor contains raw JSON-LD output from pygeoapi. +- The center editor contains the Jinja template that processes it. +- The right editor shows the final templated output. + +
+Notes on templating within pygeoapi +
+ +When pygeoapi applies a Jinja template, it considers the entire source JSON-LD to be the top-level key named `data`. Otherwise, the Jinja templating in pygeoapi is standard and follows expected patterns. + +:::note + +For info on getting pygeoapi running locally, see [step 2](/contributing/step-2/pygeoapi/deployment) of the contribution guide. + +::: + +
+
\ No newline at end of file diff --git a/docs/reference/data-formats/jsonld/overview.md b/docs/reference/data-formats/jsonld/overview.md index b3736fc..308a049 100644 --- a/docs/reference/data-formats/jsonld/overview.md +++ b/docs/reference/data-formats/jsonld/overview.md @@ -94,7 +94,7 @@ This document is located inside a `