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

Add initial new website (see #2232) #2513

Merged
merged 5 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Add initial new website (see #2232)
  • Loading branch information
vorburger committed May 6, 2024
commit 8dca744e65443bbf70e1d81018ad568cfba018c7
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
10 changes: 10 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,16 @@ 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
uses: actions/setup-python@v5
with:
python-version: 3.11
cache: "pipenv"
- name: Install PipEnv
MJ1998 marked this conversation as resolved.
Show resolved Hide resolved
uses: tiagovrtr/actions-pipenv@v1
with:
pipenv-version: 2023.12.1

- 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.yaml"
},
"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 = "*"
vorburger marked this conversation as resolved.
Show resolved Hide resolved
vorburger marked this conversation as resolved.
Show resolved Hide resolved

[dev-packages]

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

Large diffs are not rendered by default.

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

# TODO https://github.com/google/android-fhir/issues/2232 Add mkdocs generation
# "install --deploy" is better than "sync", because it checks that the Pipfile.lock
# is up-to-date with the Pipfile before installing. If it's not, it will fail the
# installation. This is useful for ensuring strict dependency control during CI.
pipenv install --deploy
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