Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mkdocs integration #591

Merged
merged 6 commits into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions documentation/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Base Docker image Official Python 3.10 (slim version as fewer reqs) | Debian
FROM python:3.10

# Set working directory
WORKDIR /app/

# Copy only contents of `documentation` folder into container's /app/ folder
COPY . /app/

# # Run installation of requirements
RUN pip install --upgrade pip

# have to prepend python -m due to misc error related to installing wheels
RUN python -m pip install mkdocs-git-committers-plugin-2 mkdocs-git-revision-date-localized-plugin mkdocs-macros-plugin mkdocs-with-pdf

# extra packages required for the Weasyprint lib (dependency for pdf plugin) https://doc.courtbouillon.org/weasyprint/stable/first_steps.html#debian-11
# RUN apt install -y python3-cffi python3-brotli libpango-1.0-0 libpangoft2-1.0-0

# Expose container's port 8000 in development (may be overridden by docker-compose file)
EXPOSE 8001

25 changes: 25 additions & 0 deletions documentation/TEMP_README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Current steps to getting docker container running:

1. Ensuring you're in the `documentation` subdir, build container with docker compose:

```bash
docker compose up
```

2. Once the container is built, it still needs the Material for Mkdocs Insiders extras installed. To do this, first start the container running:

```bash
docker run -it -p 8001:8001 documentation-mkdocs
```

3. Now, within the context of the container, using either `docker exec` or VSCode 'Attach shell':

```bash
pip install git+URL_FOR_INSIDERS
```

4. Finally, within the context of the container, using either `docker exec` or VSCode 'Attach shell':

```bash
mkdocs serve
```
17 changes: 17 additions & 0 deletions documentation/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# DOCKER COMPOSE FILE FOR LOCAL DEVELOPMENT

# Runs a local version of Epilepsy12 Documentation Mkdocs site for development on port 8001
# Syncs changes in local code folder to the mkdocs container

version: "3.10"

services:
# docs container
mkdocs:
build: .
env_file:
- ../envs/local-dev.env # required just for the mkdocs insiders auth key
ports:
- 8001:8001 # bind container port 8000 to local machine port 8001
volumes:
- ".:/app/"
4 changes: 2 additions & 2 deletions documentation/docs/clinician-users/audit-dataset.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: Audit Dataset
reviewers:
reviewers:
---

## Audit Dataset

The Key Performance Indicators for Round 4 of the Epilepsy12 audit are outlined below. For more information on the Round 4 performance indicators, including the relevant guidelines and submetrics, please see our [Round 4 methodology overview ](https://www.rcpch.ac.uk/sites/default/files/2023-08/Epilepsy12%20Round%204%20Methodology%20Overview_20230803.pdf).
The Key Performance Indicators for Round 4 of the Epilepsy12 audit are outlined below. For more information on the Round 4 performance indicators, including the relevant guidelines and submetrics, please see our [Round 4 methodology overview](https://www.rcpch.ac.uk/work-we-do/quality-improvement-patient-safety/epilepsy12-audit/methodology-data-submission#downloadBox).
4 changes: 2 additions & 2 deletions documentation/docs/development/docker-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ This means you don't need to worry about conflicts of Python versions, Python li

1. Obtain a `.env` file containing the required environment files.

These files contain credentials and secrets and therefore the `.env` files themselves are **never** committed to version control. All `*.env` files are `.gitignore`d.
These files contain credentials and secrets and therefore the `.env` files themselves are **never** committed to version control. All `*.env` files are `.gitignore`'d.

If you work with the RCPCH Incubator team, another member of the team may be able to supply you with a completed local-dev.env file.
If you work with the RCPCH Incubator team, another member of the team may be able to supply you with a completed `local-dev.env` file.

For anyone else, there is a template environment file in the repository root which you can rename to `local-dev.env` and use as a starting point.

Expand Down
6 changes: 3 additions & 3 deletions documentation/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repo_name: rcpch/epilepsy12-documentation
edit_uri: blob/live/docs

# `mkdocs serve` serves the documentation at custom port (to avoid clashing with other services we commonly run)
dev_addr: "127.0.0.1:8001"
dev_addr: "0.0.0.0:8001"

# theme settings, fonts, colours
theme:
Expand Down Expand Up @@ -53,8 +53,8 @@ plugins:
repository: rcpch/epilepsy12-documentation
branch: live
enabled: !ENV [ENABLE_GIT_COMMITTERS, false] # makes Git Committers optional
- git-revision-date-localized:
enable_creation_date: true
# - git-revision-date-localized:
# enable_creation_date: true
- search
- with-pdf:
back_cover: false
Expand Down