Skip to content

Commit

Permalink
Merge pull request #1019 from dsalaza4/main
Browse files Browse the repository at this point in the history
feat(build): #940 use mkdocs
  • Loading branch information
dsalaza4 authored Mar 8, 2023
2 parents b5576a8 + 264e32e commit b3d03bf
Show file tree
Hide file tree
Showing 14 changed files with 356 additions and 66 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ jobs:
full_commit_message: ${{ github.event.head_commit.message }}
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: docs
publish_dir: docs/book
publish_dir: docs/site
user_name: github-actions[bot]
user_email: github-actions[bot]@users.noreply.github.com

Expand Down
3 changes: 1 addition & 2 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
/book
/mermaid.min.js
/site
27 changes: 0 additions & 27 deletions docs/book.toml

This file was deleted.

4 changes: 0 additions & 4 deletions docs/mermaid-init.js

This file was deleted.

18 changes: 18 additions & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
site_name: Makes Documentation
site_url: https://fluidattacks.github.io/makes/
site_description: Documentation for Makes
site_author: Fluid Attacks
repo_url: https://github.com/fluidattacks/makes
repo_name: Makes
copyright: Copyright © 2023 Fluid Attacks, We hack your software. All rights reserved.

docs_dir: src
strict: true
theme:
name: material
markdown_extensions:
- pymdownx.superfences:
custom_fences:
- name: mermaid
class: mermaid
format: !!python/name:pymdownx.superfences.fence_code_format
16 changes: 0 additions & 16 deletions docs/src/SUMMARY.md

This file was deleted.

2 changes: 0 additions & 2 deletions makes.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@
makes = {
bin = [
inputs.nixpkgs.just
inputs.nixpkgs.mdbook
inputs.nixpkgs.mdbook-mermaid
inputs.nixpkgs.reuse
];
source = [outputs."/cli/env/runtime"];
Expand Down
7 changes: 5 additions & 2 deletions makes/docs/dev/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# shellcheck shell=bash

mdbook-mermaid install docs/
mdbook serve docs
function main {
mkdocs serve -f docs/mkdocs.yml
}

main "${@}"
7 changes: 2 additions & 5 deletions makes/docs/dev/main.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
{
inputs,
makeScript,
outputs,
...
}:
makeScript {
name = "docs-dev";
entrypoint = ./entrypoint.sh;
searchPaths.bin = [
inputs.nixpkgs.mdbook
inputs.nixpkgs.mdbook-mermaid
];
searchPaths.source = [outputs."/docs/runtime"];
}
7 changes: 5 additions & 2 deletions makes/docs/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# shellcheck shell=bash

mdbook-mermaid install docs/
mdbook build docs
function main {
mkdocs build -f docs/mkdocs.yml
}

main "${@}"
7 changes: 2 additions & 5 deletions makes/docs/main.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
{
inputs,
makeScript,
outputs,
...
}:
makeScript {
name = "docs";
entrypoint = ./entrypoint.sh;
searchPaths.bin = [
inputs.nixpkgs.mdbook
inputs.nixpkgs.mdbook-mermaid
];
searchPaths.source = [outputs."/docs/runtime"];
}
15 changes: 15 additions & 0 deletions makes/docs/runtime/main.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
inputs,
makePythonPypiEnvironment,
makeSearchPaths,
...
}:
makeSearchPaths {
bin = [inputs.nixpkgs.mkdocs];
source = [
(makePythonPypiEnvironment {
name = "docs-runtime-pypi";
sourcesYaml = ./pypi/sources.yaml;
})
];
}
1 change: 1 addition & 0 deletions makes/docs/runtime/pypi/deps.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mkdocs-material: "9.1.1"
306 changes: 306 additions & 0 deletions makes/docs/runtime/pypi/sources.yaml

Large diffs are not rendered by default.

0 comments on commit b3d03bf

Please sign in to comment.