Skip to content

Commit

Permalink
Merge pull request #167 from callowayproject/refactor-docs
Browse files Browse the repository at this point in the history
Refactored the docs
  • Loading branch information
coordt authored Mar 27, 2024
2 parents 4a8fc13 + 2aa1011 commit d66d34e
Show file tree
Hide file tree
Showing 37 changed files with 15 additions and 16 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ A **version serialization format** is a list of format strings used to serialize
### How a version spec is generated

<figure markdown="span" style="width: 50%; float: right;padding-left: .75rem">
[![How a version spec is generated](../_static/creating-a-version-spec.svg)](../_static/creating-a-version-spec.svg)
[![How a version spec is generated](../assets/creating-a-version-spec.svg)](../assets/creating-a-version-spec.svg)
<figcaption>How a configuration file is used to generate a version spec.</figcaption>
</figure>

Expand All @@ -54,7 +54,7 @@ The _component dependency_ graph determines the order in which the _version comp
### How a version is generated

<figure markdown="span" style="width: 50%; float: right;padding-left: .75rem">
[![How a version is generated](../_static/creating-a-version.svg)](../_static/creating-a-version.svg)
[![How a version is generated](../assets/creating-a-version.svg)](../assets/creating-a-version.svg)
<figcaption>How a version spec is used to generate a version.</figcaption>
</figure>

Expand Down Expand Up @@ -84,7 +84,7 @@ The `serialize` method of the _version spec_ returns either the optimal serializ

::: card-container depth-0
::: card-media
[![How a version is serialized with values major=1, minor=2, and patch=3](../_static/serializing-a-version-1-2-3.svg)](../_static/serializing-a-version-1-2-3.svg)
[![How a version is serialized with values major=1, minor=2, and patch=3](../assets/serializing-a-version-1-2-3.svg)](../assets/serializing-a-version-1-2-3.svg)

::: card-content
No optional values
Expand All @@ -94,7 +94,7 @@ The `serialize` method of the _version spec_ returns either the optimal serializ

::: card-container depth-0
::: card-media
[![How a version is serialized with values major=1, minor=2, and patch=0](../_static/serializing-a-version-1-2-0.svg)](../_static/serializing-a-version-1-2-0.svg)
[![How a version is serialized with values major=1, minor=2, and patch=0](../assets/serializing-a-version-1-2-0.svg)](../assets/serializing-a-version-1-2-0.svg)
::: card-content
Expand All @@ -105,7 +105,7 @@ The `serialize` method of the _version spec_ returns either the optimal serializ

::: card-container depth-0
::: card-media
[![How a version is serialized with values major=1, minor=0, and patch=0](../_static/serializing-a-version-1-0-0.svg)](../_static/serializing-a-version-1-0-0.svg)
[![How a version is serialized with values major=1, minor=0, and patch=0](../assets/serializing-a-version-1-0-0.svg)](../assets/serializing-a-version-1-0-0.svg)

::: card-content
Two optional values
Expand All @@ -115,7 +115,7 @@ The `serialize` method of the _version spec_ returns either the optimal serializ

::: card-container depth-0
::: card-media
[![How a version is serialized with invalid serialization formats](../_static/serializing-a-version-1.svg)](../_static/serializing-a-version-1.svg)
[![How a version is serialized with invalid serialization formats](../assets/serializing-a-version-1.svg)](../assets/serializing-a-version-1.svg)

::: card-content
No valid serialization options
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 7 additions & 8 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ site_name: Bump My Version
repo_url: https://github.com/callowayproject/bump-my-version
edit_uri: edit/master/docs/
copyright: Calloway Project
docs_dir: docsrc
watch:
- overrides
theme:
name: material
custom_dir: overrides
logo: _static/bump-my-version-logo.svg
favicon: _static/favicon.png
logo: assets/bump-my-version-logo.svg
favicon: assets/favicon.png
features:
- navigation.tabs
- navigation.sections
Expand Down Expand Up @@ -78,7 +77,7 @@ plugins:
nav_file: SUMMARY.md
- gen-files:
scripts:
- docsrc/gen_doc_stubs.py
- docs/gen_doc_stubs.py
- mkdocstrings:
custom_templates: overrides/mkdocstrings
handlers:
Expand Down Expand Up @@ -111,10 +110,10 @@ extra_javascript:
- "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_CHTML"

extra_css:
- _static/css/custom.css
- _static/css/mkdocstrings.css
- _static/css/cards.css
- _static/css/field-list.css
- assets/css/custom.css
- assets/css/mkdocstrings.css
- assets/css/cards.css
- assets/css/field-list.css

#nav:
# - General: "general/"
Expand Down
4 changes: 2 additions & 2 deletions tools/drawioexport.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ def export_file_if_needed(source: Path, page_index: int, dest_path: Path) -> Non
"serializing-a-version-1-2-0.svg",
"serializing-a-version-1-2-3.svg",
]
source_path = Path(__file__).parent.parent.joinpath("docsrc/_static/bump-my-version-model.drawio")
dest_path = Path(__file__).parent.parent.joinpath("docsrc/_static/")
source_path = Path(__file__).parent.parent.joinpath("docs/assets/bump-my-version-model.drawio")
dest_path = Path(__file__).parent.parent.joinpath("docs/assets/")
for index, filename in enumerate(output_files):
filepath = dest_path.joinpath(filename)
export_file_if_needed(source_path, index, filepath)

0 comments on commit d66d34e

Please sign in to comment.