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

feat(docs): Integrate Rust docs to our general mkDocs #173

Merged
merged 15 commits into from
Dec 12, 2023
11 changes: 6 additions & 5 deletions catalyst-gateway/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ VERSION 0.7

# Set up our target toolchains, and copy our files.
builder:
FROM github.com/input-output-hk/catalyst-ci/earthly/rust:v2.0.3+rust-base
FROM github.com/input-output-hk/catalyst-ci/earthly/rust:feat/rust-docs+rust-base

DO github.com/input-output-hk/catalyst-ci/earthly/rust:v2.0.3+SETUP --toolchain=rust-toolchain.toml
DO github.com/input-output-hk/catalyst-ci/earthly/rust:feat/rust-docs+SETUP --toolchain=rust-toolchain.toml

DO github.com/input-output-hk/catalyst-ci/earthly/rust:v2.0.3+CP_SRC --src=".cargo .config Cargo.* clippy.toml deny.toml rustfmt.toml bin crates"
DO github.com/input-output-hk/catalyst-ci/earthly/rust:feat/rust-docs+CP_SRC --src=".cargo .config Cargo.* clippy.toml deny.toml rustfmt.toml bin crates"

# Test rust build container - Use best architecture host tools.
check-hosted:
Expand All @@ -27,9 +27,9 @@ build-hosted:
# Build the service
FROM +builder

RUN /scripts/std_build.sh
DO github.com/input-output-hk/catalyst-ci/earthly/rust:feat/rust-docs+BUILD

DO github.com/input-output-hk/catalyst-ci/earthly/rust:v2.0.3+SMOKE_TEST --bin=cat-gateway
DO github.com/input-output-hk/catalyst-ci/earthly/rust:feat/rust-docs+SMOKE_TEST --bin=cat-gateway

SAVE ARTIFACT target/$TARGETARCH/doc doc
SAVE ARTIFACT target/$TARGETARCH/release/cat-gateway cat-gateway
Expand All @@ -39,6 +39,7 @@ build-hosted:
build-all-hosts:
BUILD --platform=linux/amd64 --platform=linux/arm64 +build-hosted


## -----------------------------------------------------------------------------
##
## Standard CI targets.
Expand Down
8 changes: 5 additions & 3 deletions docs/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,23 @@ VERSION 0.7
# Copy all the source we need to build the docs
src:
# Common src setup
DO github.com/input-output-hk/catalyst-ci/earthly/docs:v2.0.8+SRC
DO github.com/input-output-hk/catalyst-ci/earthly/docs:feat/rust-docs+SRC

# Now copy into that any artifacts we pull from the builds.
COPY --dir ../+repo-docs/repo /docs/includes
# copy Rust docs
COPY ./../catalyst-gateway+build-hosted/doc /docs/src/api/catalyst-gateway/rust-docs

# Build the docs here.
docs:
FROM +src

DO github.com/input-output-hk/catalyst-ci/earthly/docs:v2.0.8+BUILD
DO github.com/input-output-hk/catalyst-ci/earthly/docs:feat/rust-docs+BUILD

# Make a locally runable container that can serve the docs.
local:
# Build a self contained service to show built docs locally.
DO github.com/input-output-hk/catalyst-ci/earthly/docs:v2.0.8+PACKAGE
DO github.com/input-output-hk/catalyst-ci/earthly/docs:feat/rust-docs+PACKAGE

# Copy the static pages into the container
COPY +docs/ /usr/share/nginx/html
Expand Down
5 changes: 3 additions & 2 deletions docs/src/.pages
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
arrange:
- index.md
nav:
- 'Home': index.md
stevenj marked this conversation as resolved.
Show resolved Hide resolved
- getting-started
- catalyst-standards
- 'API': api
- architecture
- appendix
3 changes: 3 additions & 0 deletions docs/src/api/.pages
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nav:
- index.md
- 'Catalyst gateway': catalyst-gateway.md
28 changes: 28 additions & 0 deletions docs/src/api/catalyst-gateway.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
icon: material/gate
---

# Catalyst Gateway Rust docs

<!-- markdownlint-disable no-inline-html -->
<iframe src="rust-docs/index.html" title="RUSTDOC Documentation" style="height:800px;width:100%;"></iframe>

[OPEN FULL PAGE](./catalyst-gateway/rust-docs/index.html)

## Workspace Dependency Graph

```kroki-graphviz
@from_file:./api/catalyst-gateway/rust-docs/workspace.dot
```

## External Dependencies Graph

```kroki-graphviz
@from_file:./api/catalyst-gateway/rust-docs/full.dot
```

## Build and Development Dependencies Graph

```kroki-graphviz
@from_file:./api/catalyst-gateway/rust-docs/all.dot
```
5 changes: 5 additions & 0 deletions docs/src/api/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
icon: material/api
---

# Catalyst Voices API docs
2 changes: 1 addition & 1 deletion docs/src/appendix/important/.pages
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
arrange:
nav:
- index.md
- contributing.md
- coc.md
Expand Down
2 changes: 1 addition & 1 deletion docs/src/architecture/.pages
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
arrange:
nav:
- index.md
- 01_introduction_and_goals.md
- 02_architecture_constraints.md
Expand Down
1 change: 0 additions & 1 deletion docs/src/catalyst-standards/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
icon: material/pillar
---

<!-- markdownlint-disable MD025-->
# Catalyst Standards

These are documents that relate to standardized specifications of the catalyst stack.
Loading