Skip to content

Commit

Permalink
add documentation and diagrams
Browse files Browse the repository at this point in the history
  • Loading branch information
mradamcox committed Nov 17, 2023
1 parent 5e0460b commit f9f7d0f
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 0 deletions.
50 changes: 50 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,52 @@
# healthyregions.github.io

Web map repository for various projects from the Healthy Regions & Policies Lab.

Individual projects are stored in subdirectories and published to `maps.healthyregions.org/project-name`.

Subdirectories can contain content native to this repo, or can be submodules that link directly to other repositories.

![structure](./structure.png)

Submodules have the benefit of retaining an author's autonomy over the home repository, and also allows for the incorporation of existing projects.

Native subdirectories have the advantage of keeping all code in this repo, and being generally easier to deal with.

Both native subdirectory and submodule repos must have an `index.html` file in their root.

## Pblish submodule updates

If changes are made to an external repo that is implemented here as a submodule, a GitHub pages will need to be rebuilt for those changes to be published.

An admin of this repo can trigger the rebuild with the following four clicks:

![running pages workflow](./run-workflow.png)

The changes will be published within a few moments.

## Managing submodules

### Add/remove

In a local clone of the repo

```
git submodule add https://github.com/<user>/<repo> <subdirectory>
git commit
```

```
git rm <subdirectory>
git commit
```

### Maintenance

Note that the pages build process won't actually update submodules in the committed code base. For that, an admin can use something like:

```
git clone https://github.com/healthyregions/healthyregions.github.io --recurse-submodules
cd healthyregions.github.io
git submodule update --recursive --remote
git commit
```
Binary file added run-workflow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions structure.d2
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
direction: right

m: External GH repo\nlinked via submodule

r: This Repository\n
r.p1: SDOH Map\n/sdoh\n(native)
r.p2: MTAS Map\n/mtas\n(submodule)

site: Published Location
site.p1: maps.healthyregions.org/sdoh
site.p2: maps.healthyregions.org/mtas

r.p1 -> site.p1
m -- r.p2: {
style: {
stroke-dash: 2
}
}
r.p2 -> site.p2
Binary file added structure.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f9f7d0f

Please sign in to comment.