Skip to content

Commit

Permalink
Merge pull request #18 from stakater/task/make-suggested-modification…
Browse files Browse the repository at this point in the history
…s-to-mto-docs-sa-5749

[Task] Make suggested modifications to mto docs theme SA 5749
  • Loading branch information
RSAK56 authored May 20, 2024
2 parents af9b359 + aef40c2 commit a17e7ef
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 14 deletions.
34 changes: 22 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ docs_dir: content
edit_uri: blob/main/content/

nav:
- index.md
- index.md
```
### 3. Add content in target MkDocs project
Expand Down Expand Up @@ -78,26 +78,36 @@ execute the following commands in the root of your target project:

1. Install Python Dependencies:

```bash
pip3 install -r theme_common/requirements.txt
```
```bash
pip3 install -r theme_common/requirements.txt
```

1. Combine Theme Resources:

```bash
python theme_common/scripts/combine_theme_resources.py theme_common/resources theme_override/resources dist/_theme
```
```bash
python theme_common/scripts/combine_theme_resources.py theme_common/resources theme_override/resources dist/_theme
```

> Above command will output combined theme to `dist/_theme`.
> Above command will output combined theme to `dist/_theme`.

1. Produce mkdocs YAML file:

```bash
python theme_common/scripts/combine_mkdocs_config_yaml.py theme_common/mkdocs.yml theme_override/mkdocs.yml mkdocs.yml
```
```bash
python theme_common/scripts/combine_mkdocs_config_yaml.py theme_common/mkdocs.yml theme_override/mkdocs.yml mkdocs.yml
```

> These scripts will create a combined theme and a `mkdocs.yml` file.
> These scripts will create a combined theme and a `mkdocs.yml` file.

Your target project will now have an mkdocs theme. If you want to customise `mkdocs.yml` or theme resources, you can do so by modifying files in `theme_override` folder and running the above scripts again.

Your Dockerfile in the target repo needs to run the same steps to build the combined theme that will be used to build the docs.

Versioning is provided by `theme_override` and can be added to the `mkdocs.yml` when required under:

```extra:
version:
provider: mike
default: latest
```
It is compiled under the `dist/_theme`
4 changes: 2 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ theme:
cloud_security_alliance_logo_light: assets/images/CSA_light.png
hippa_compliant_logo_dark: assets/images/HC_dark.png
hippa_compliant_logo_light: assets/images/HC_light.png
favicon: assets/images/logo-light.png
favicon: assets/images/stakater_favicon.png

palette:
- media: "(prefers-color-scheme)"
Expand Down Expand Up @@ -50,7 +50,7 @@ markdown_extensions:
- admonition
- pymdownx.details
- pymdownx.superfences
- attr_list
# - attr_list
- pymdownx.emoji:
emoji_index: !!python/name:material.extensions.emoji.twemoji
emoji_generator: !!python/name:material.extensions.emoji.to_svg
Expand Down
Binary file removed resources/assets/images/logo-dark.png
Binary file not shown.
Binary file removed resources/assets/images/logo-light.png
Binary file not shown.
Binary file added resources/assets/images/stakater_favicon.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 a17e7ef

Please sign in to comment.