Skip to content

Commit

Permalink
Add initial new website (see #2232)
Browse files Browse the repository at this point in the history
  • Loading branch information
vorburger committed May 2, 2024
1 parent 12d0762 commit 2fc29aa
Show file tree
Hide file tree
Showing 12 changed files with 661 additions and 22 deletions.
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

"features": {
// https://github.com/akhildevelops/devcontainer-features/issues/7
"ghcr.io/akhildevelops/devcontainer-features/android-cli:0": {}
"ghcr.io/akhildevelops/devcontainer-features/android-cli:0": {},
"ghcr.io/devcontainers-contrib/features/pipenv:2": {}

// https://github.com/CASL0/devcontainer-features/issues/4
// "ghcr.io/casl0/devcontainer-features/android-sdk:1": {}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ jobs:
# This deploys content based on docs/ which ends up in site/
# to https://google.github.io/android-fhir/ using GitHub Pages.

- name: Install Python, pipenv and Pipfile packages
uses: palewire/install-python-pipenv-pipfile@v3
with:
python-version: 3.12

- name: Build Docs Site
# This 1st step intentionally runs not just on the main ("master") branch
# but also for all pull requests. This serves to detect doc breakages.
Expand Down
6 changes: 5 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{
"recommendations": ["davidanson.vscode-markdownlint"]
"recommendations": [
"davidanson.vscode-markdownlint",
"streetsidesoftware.code-spell-checker",
"redhat.vscode-yaml"
]
}
14 changes: 14 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
// https://squidfunk.github.io/mkdocs-material/creating-your-site/
"yaml.schemas": {
"https://squidfunk.github.io/mkdocs-material/schema.json": "mkdocs.yml"
},
"yaml.customTags": [
"!ENV scalar",
"!ENV sequence",
"!relative scalar",
"tag:yaml.org,2002:python/name:material.extensions.emoji.to_svg",
"tag:yaml.org,2002:python/name:material.extensions.emoji.twemoji",
"tag:yaml.org,2002:python/name:pymdownx.superfences.fence_code_format"
]
}
12 changes: 12 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
mkdocs-material = "*"

[dev-packages]

[requires]
python_version = "3.11"
556 changes: 556 additions & 0 deletions Pipfile.lock

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions build-docs.bash
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,11 @@ set -euox pipefail
rm -rf site/
mkdir -p site/

# TODO https://github.com/google/android-fhir/issues/2232 Add mkdocs generation
pipenv run mkdocs build

./gradlew dokkaHtml
mkdir -p site/api/
mv docs/data-capture site/api/
mv docs/engine site/api/
mv docs/knowledge site/api/
mv docs/workflow site/api/

cp -R docs/index.html site/

25 changes: 25 additions & 0 deletions docs/contrib/docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Docs

Developer Documentation for both users of and contributors to this project is maintained
alongside its code in [the `docs/` folder its git repo](https://github.com/google/android-fhir/tree/master/docs).

The <https://google.github.io/android-fhir/> website is automatically generated from this with Continous Integration.

This website is built using [Material](https://squidfunk.github.io/mkdocs-material/) for [MkDocs](https://www.mkdocs.org/).

## Contribute

Contributions to the documentation are very welcome, and should typically be made together with code contributions.

You can edit the `docs/**.md` files with any editor you like and include such changes with your regular Pull Requests.

New MD files needs to be added to `nav:` in [`mkdocs.yaml`](https://github.com/google/android-fhir/blob/master/mkdocs.yaml).

To generate the website, for simplicity we recommend using [GitHub Codespaces](codespaces.md); in a Terminal of such a Codespace:

1. `pipenv shell`: This enters a [Python "virtual environment" (`venv`)](https://docs.python.org/3/library/venv.html), using [`pipenv`](https://pipenv.pypa.io/)

1. `mkdocs serve`

1. Confirm Codespace's _"Port Forward"_ prompt to open `https://...app.github.dev`, et voilà!

16 changes: 0 additions & 16 deletions docs/index.html

This file was deleted.

6 changes: 6 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Welcome to Android FHIR SDK Technical Documentation

The Android FHIR SDK is a set of Kotlin libraries for building offline-capable, mobile-first
healthcare applications using the [HL7® FHIR® standard](https://www.hl7.org/fhir/) on Android. It
aims to accelerate the adoption of FHIR by making it easy to incorporate FHIR into new and existing
mobile applications.
6 changes: 6 additions & 0 deletions docs/use/api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# API

* [Engine](/api/engine/1.0.0/)
* [Data Capture](/data-capture/1.1.0/)
* [Workflow](/api/workflow/0.1.0-alpha04/)
* [Knowledge](/api/knowledge/0.1.0-alpha03/)
29 changes: 29 additions & 0 deletions mkdocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
site_name: Android FHIR SDK
site_url: https://google.github.io/android-fhir/
repo_url: https://github.com/google/android-fhir/
edit_uri: blob/master/docs/
copyright: Copyright 2024 The Android FHIR SDK Authors

nav:
- Users:
- API: use/api.md
- Contributors:
- Codespaces: contrib/codespaces.md
- Documentation: contrib/docs.md

theme:
name: material
features:
- content.action.edit
- content.code.copy
- navigation.expand
- navigation.footer
- navigation.instant
- navigation.tracking
- navigation.expand
- navigation.path
- navigation.top
- navigation.sections
- navigation.tabs
- search.suggest
- search.share

0 comments on commit 2fc29aa

Please sign in to comment.