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

Render docs with Quarto using ReadTheDocs #201

Merged
merged 1 commit into from
Dec 7, 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
12 changes: 12 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2


build:
os: "ubuntu-22.04"
tools:
# https://docs.readthedocs.io/en/stable/config-file/v2.html#build-tools-python
python: "mambaforge-22.9"
commands:
- "conda install quarto~=1.3.450"
- "cd doc && quarto render"
- "mv doc/_site/* $READTHEDOCS_OUTPUT/html/."
2 changes: 2 additions & 0 deletions doc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/.quarto/
/_site/
40 changes: 40 additions & 0 deletions doc/_quarto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
project:
type: "website"


website:
title: "US AON Benefit Tool"
site-url: "https://nsidc.github.io/usaon-benefit-tool"

repo-url: "https://github.com/nsidc/usaon-benefit-tool"
repo-actions:
- "edit"
- "source"
- "issue"


page-footer:
right: "This page is built with [Quarto](https://quarto.org/)."
left: "©"

sidebar:
style: "docked"
search: true
contents:
- text: "How to"
href: "how-to/index.md"
- text: "Reference"
href: "reference/index.md"

# Separator:
- text: "---"

- text: "Notes"
href: "notes/index.md"


format:
html:
from: "markdown+emoji"
theme: ["cosmo", "style.scss"]
toc: true
3 changes: 1 addition & 2 deletions doc/db.md → doc/how-to/db.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Database

# Database setup

It's expected that you'll set up a DB separately from the app. The app uses a proxy
container to enable it to talk to an external DB through the hostname `db`.
Expand Down
2 changes: 1 addition & 1 deletion doc/development.md → doc/how-to/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ln -s docker-compose.dev.yml docker-compose.override.yml

### Define environment variables

Define the environment variables as specified in [envvars.md](./envvars.md):
Define the environment variables as specified in [envvars.md](/reference/envvars.md):

```bash
export USAON_VTA_DB_HOST=...
Expand Down
6 changes: 6 additions & 0 deletions doc/how-to/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
listing:
type: "table"
fields:
- "title"
---
8 changes: 8 additions & 0 deletions doc/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: "US Arctic Observing Network Benefit Tool"
subtitle: "Software documentation"
---

:::{.callout-important}
For user documentation, please see https://usaon.org/evaluation-and-planning/benefit-tool
:::
6 changes: 5 additions & 1 deletion doc/TODO.md → doc/notes/TODO.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Templates
---
title: "TODO"
---

## Templates

* Should Jinja templates have a `.html` or `.j2` extension?
6 changes: 6 additions & 0 deletions doc/notes/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
listing:
type: "table"
fields:
- "title"
---
File renamed without changes.
6 changes: 6 additions & 0 deletions doc/reference/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
listing:
type: "table"
fields:
- "title"
---