Note
This repository is in early development. We are currently in the process of reviewing, pruning, and consolidating our documentation.
This repository contains the content that we compile into our documentation website.
This repository has the following sections:
./content
: Current, high-level content about NMDC./legacy
: Legacy content we include in the website to support legacy references/publications./src
: Code we use to compile local and remote content into a website./
: Repository-level configuration files and documentation
Note
TODO
Most of the files in the legacy/nmdc-documentation
directory are files that we copied from
commit 8786ff5a
in the NMDC_documentation repository.
That was the latest commit on the main
branch as of August 28, 2024.
In addition to the files we copied, the directory also contains some files that are exclusive to this repository;
e.g., Dockerfile
and .gitignore
.
When copying the aforementioned files from the NMDC_documentation
repository, we omitted the following files:
- Schema element documentation in
docs/reference/metadata
- Schema-related images in
docs/_static/images/reference/metadata
- Schema in
docs/_static/jsonschema
Instead of maintaining a local copy of that documentation here, we redirect visitors to the standalone schema documentation.
Example: When someone visits
/reference/metadata/xylene.html
on this documentation website, they'll be automatically redirected to https://microbiomedata.github.io/nmdc-schema/xylene/. This redirection is configured inlegacy/nmdc-documentation/src/conf.py
.
You can compare the legacy/nmdc-documentation/src
directory with the corresponding directory in the
upstream repository, by following these steps:
# Clone the upstream repository onto your computer.
git clone https://github.com/microbiomedata/NMDC_documentation.git /tmp/NMDC_documentation
# Use Git to compare the corresponding directories.
git diff --stat /tmp/NMDC_documentation/docs ./legacy/nmdc-documentation/src
This documentation is implemented within the Sphinx framework. The content is organized according to the Diátaxis guidelines.
Here's how you can propose changes to this documentation:
Note: The general flow is: (1) create a GitHub Issue, (2) create a branch associated with that Issue, (3) make changes on that branch, and (4) create a Pull Request to merge that branch into the
main
branch. The following are a couple of the many ways someone can do those things (other ways are also OK).
- Create a GitHub Issue describing what you want to change (e.g. "Fix Foo in Bar")
- On GitHub, go to the file within
legacy/nmdc-documentation/src/
that you want to edit - Click the "Edit this file" button (i.e. the pencil icon button) at the upper right
- Edit the file
- Click the "Commit changes..." button at the upper right
- Customize the commit message to tell others what you did (e.g. "
Fix typo in link
") - Mark the bubble that says "Create a new branch for this commit and start a pull request"
- (Recommended) Customize the branch name so it starts with the GitHub Issue number (e.g.
123-fix-foo-in-bar
) - Click "Propose changes"
- Fill in the Pull Request form and click "Create pull request"
You will end up with a Pull Request (PR) containing the changes. Once the PR gets merged into main
,
the documentation website will automatically be updated to reflect the changes.
- Visit https://github.dev/microbiomedata/docs/
- Click the branch name (e.g.
main
) at the lower left - Click "Create a new branch..." at the top
- Enter a name for the branch, beginning with an issue number (e.g.
123-fix-foo-in-bar
) - (If prompted) Click "Switch to Branch"
- Make changes in
legacy/nmdc-documentation/src
- Click the "Source Control" icon in the left sidebar (3rd from the top)
- Hover over the "Changes" heading and click the
+
icon that appears - Enter a commit message to tell others what you did (e.g. "
Fix typo in link
") - Click the "Commit & Push" button
- Visit https://github.com/microbiomedata/docs/ and create a Pull Request for that branch
You will end up with a Pull Request (PR) containing the changes. Once the PR gets merged into main
,
the documentation website will automatically be updated to reflect the changes.
Note
TODO
.github/workflows
: GitHub Actions workflowsdocker-compose.yml
: Specification for a set of container images you can use when editing any section of our documentation websiteREADME.md
: This document
The .github/workflows
directory contains YAML files that we use to configure GitHub Actions.
We use GitHub Actions to (a) compile local and remote content into a website,
and to (b) publish that website to the Internet.
Assuming you have Docker installed, you can spin up the development environment by running:
docker compose up
That will run a web server, serving the legacy section of the website at the following URL:
In addition, whenever you make changes to content, the associated sections of the website will automatically be rebuilt (at which point, you can refresh your web browser to see the newly-rebuilt sections).
- Populate the "TODO" sections above
- Update legacy
requirements.txt
files to indicate specific versions - Implement a framework for pulling in content from external sources
- Configure a vanity URL once we have a cohesive website
- Migrate
.rst
files into Markdown (.md
)