From 9caa4540b7cd5bea91dd79bddfdc27df3326f354 Mon Sep 17 00:00:00 2001 From: Jody Garnett Date: Fri, 24 May 2024 14:44:35 -0700 Subject: [PATCH] reduce instructions to what is useful for the 2.10 branch --- docs/manual/README.md | 47 +++++++++++++++--------- docs/manual/overrides/partials/main.html | 6 +++ 2 files changed, 35 insertions(+), 18 deletions(-) create mode 100644 docs/manual/overrides/partials/main.html diff --git a/docs/manual/README.md b/docs/manual/README.md index 5390a9f40b1..2f53a60e86d 100644 --- a/docs/manual/README.md +++ b/docs/manual/README.md @@ -1,12 +1,12 @@ -# Geonetwork Manual and Help +# GeoNetwork Manual and Help -Documentation for GeoNetwork opensource is available via https://geonetwork-opensource.org. +Documentation for GeoNetwork opensource is available via https://docs.geonetwork-opensource.org. -This documentation is written under the creative commons license [Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)](LICENSE.md). +This documentation is written under the Creative Commons license [Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)](LICENSE). Reference: -* [Documentation Writing Guide](docs/devel/docs/docs.md) +* [Documentation Writing Guide](docs/devel/docs/index.md) ## Communication @@ -14,15 +14,21 @@ The [project issue tracker](https://github.com/geonetwork/core-geonetwork/issues ## Material for MkDocs -Documentation is [mkdocs-material](https://squidfunk.github.io/mkdocs-material/) which is a Markdown documentation framework written on top of [MkDocs](https://www.mkdocs.org/). +Documentation is [MkDocs-material](https://squidfunk.github.io/mkdocs-material/) which is a Markdown documentation framework written on top of [MkDocs](https://www.mkdocs.org/). -If you are using python3: +If you are using Python3: 1. Install using ``pip3`` and build: ```bash pip3 install -r requirements.txt ``` + + In the future you can update using: + + ```bash + pip3 install -r requirements.txt -U + ``` 2. Use ***mkdocs** to preview locally: @@ -45,7 +51,7 @@ If you are using python3: ### VirtualEnv -If you use a python virtual environment: +If you use a Python virtual environment: 1. Activate virtual environment: @@ -55,6 +61,13 @@ If you use a python virtual environment: pip install -r requirements.txt ``` + In the future you can update with: + + ```bash + source venv/bin/activate + pip3 install -r requirements.txt + ``` + 2. Use ***mkdocs*** to preview from virtual environment: ```bash @@ -63,26 +76,24 @@ If you use a python virtual environment: 3. Preview: http://localhost:8000 -### Docker - -If you are not familiar with python the mkdocs-material website has instructions for docker: - -1. Run mkdocs in Docker environment: - + Preview uses a single version, so expect some warnings from version chooser: ``` - docker pull squidfunk/mkdocs-material - docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material + "GET /versions.json HTTP/1.1" code 404 ``` + +4. Optional: Preview online help: -2. Preview: http://localhost:8000 - + ```bash + mkdocs serve --config-file help.yml + ``` + ## Publish 2.10.x Archive Docs We use ``mike`` for publishing (from the `gh-pages` branch). Docs are published by the ``.github/workflows/docs.yml`` automation each time pull-request is merged. If you wish to preview using your own `gh-pages` branch: -1. To update publish documentation: +1. To update publish 2.10 documentation: ```bash mike deploy --push 2.10 diff --git a/docs/manual/overrides/partials/main.html b/docs/manual/overrides/partials/main.html new file mode 100644 index 00000000000..1c0f8c9d122 --- /dev/null +++ b/docs/manual/overrides/partials/main.html @@ -0,0 +1,6 @@ +{% extends "base.html" %} + +{% block outdated %} + GeoNetwork 2.10 is outdated. + Click here to go to stable. +{% endblock %}