Skip to content

Commit

Permalink
Merge pull request #415 from Mara3l/master
Browse files Browse the repository at this point in the history
DP-2705: Updating the CONTRIBUTING.md with hugo

Reviewed-by: Jan Kadlec
             https://github.com/hkad98
  • Loading branch information
gdgate authored Nov 8, 2023
2 parents d00c24d + 8279b54 commit 6edd894
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 1 deletion.
67 changes: 67 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,73 @@ The documentation is deployed using manually triggered GitHub workflows.

One logical change is done in one commit.

### Documenting new features

To document a new feature, you need to create a new `.md` file in one of the subsections. These subsections reresent the left navigation menu and are in a hierarchical directories.

e.g.:

administration
├── organization
│ ├── create_or_update_jwk.md
│ ├── delete_jwk.md
│ └── ...
├── premissions
│ ├── list_available_assignees.md
│ ├── get_declarative_organization_permissions.md
│ └── ...
└── ...


> Note that you would not only need to add new `.md` but also edit the existing `_index.md` in the same directory to add a link to your new method.

Example:

Imagine you just created a new method named `super_permissions_method` and would like to document it.

Steps:

1. You make sure to properly document your new method in the docstrings.

1. You create a new file `super_permissions_method.md` in `docs/content/en/docs/administration/permissions/`

1. With content:

```
---
title: "super_permissions_method"
linkTitle: "super_permissions_method"
superheading: "catalog_permission."
weight: 100
---
{{< python "sdk.CatalogPermissionService.super_permissions_method" >}}
## Example
```python
# This method does something very cool, trust me bro
sdk.super_permissions_method(user_id = "demo_user", give_all_permission = True)
```
The `{{< python "PATH" >}}` is a hugo shortcode, that will render the information about the method directly from the docstrings. The `PATH` parameter is represented as a path in the API references with a dot `.` denoting each step.
So in our example, this is an `sdk` package with the permissions service (`CatalogPermissionService`) and then followed by the actual method (`super_permissions_method`).
1. You update the `_index.md` in the same folder:
```diff
* [update_name](./update_name/)
* [update_oidc_parameters](./update_oidc_parameters/)
* [create_or_update_jwk](./create_or_update_jwk/)
* [delete_jwk](./delete_jwk/)
* [get_jwk](./get_jwk/)
* [list_jwks](./list_jwks/)
+ * [super_permissions_method](./super_permissions_method/)
```
1. Lastly you contact someone from the documentation team for a proof-read and merge. Your changes should be visible in the preview in the PR job named `Netlify Deploy Preview`
## Run tests
Tests use [tox](https://tox.wiki/en/latest/index.html) and [pytest](https://docs.pytest.org/en/6.2.x/contents.html)
Expand Down
2 changes: 1 addition & 1 deletion docs/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.20

require (
github.com/FortAwesome/Font-Awesome v0.0.0-20230327165841-0698449d50f2 // indirect
github.com/gooddata/gooddata-docs-theme v0.0.0-20231026115610-865757c9da13 // indirect
github.com/gooddata/gooddata-docs-theme v0.0.0-20231108114123-c9a40ae4f92a // indirect
github.com/google/docsy v0.7.1 // indirect
github.com/google/docsy/dependencies v0.7.1 // indirect
github.com/twbs/bootstrap v5.3.1+incompatible // indirect
Expand Down
2 changes: 2 additions & 0 deletions docs/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ github.com/gooddata/gooddata-docs-theme v0.0.0-20231020110753-c96d5d57bff5 h1:jN
github.com/gooddata/gooddata-docs-theme v0.0.0-20231020110753-c96d5d57bff5/go.mod h1:VVNP6Cmo+vC37RD3T/YHjyU/QdqftGY5z4G513LYyrA=
github.com/gooddata/gooddata-docs-theme v0.0.0-20231026115610-865757c9da13 h1:s6+8+l46mnvOU0SW3LD8thIBTNpv8xMhXxdJyIk+zbk=
github.com/gooddata/gooddata-docs-theme v0.0.0-20231026115610-865757c9da13/go.mod h1:VVNP6Cmo+vC37RD3T/YHjyU/QdqftGY5z4G513LYyrA=
github.com/gooddata/gooddata-docs-theme v0.0.0-20231108114123-c9a40ae4f92a h1:o7IiFfQRujgAMMJVLmsftKBbEInSJhdokqXO/OTvPOs=
github.com/gooddata/gooddata-docs-theme v0.0.0-20231108114123-c9a40ae4f92a/go.mod h1:VVNP6Cmo+vC37RD3T/YHjyU/QdqftGY5z4G513LYyrA=
github.com/google/docsy v0.7.1 h1:DUriA7Nr3lJjNi9Ulev1SfiG1sUYmvyDeU4nTp7uDxY=
github.com/google/docsy v0.7.1/go.mod h1:JCmE+c+izhE0Rvzv3y+AzHhz1KdwlA9Oj5YBMklJcfc=
github.com/google/docsy/dependencies v0.7.1 h1:NbzYKJYMin2q50xdWSUzR2c9gCp7zR/XHDBcxklEcTQ=
Expand Down

0 comments on commit 6edd894

Please sign in to comment.