Skip to content

Commit

Permalink
Versioning is an exception, not the rule (#11)
Browse files Browse the repository at this point in the history
* update

* update

* update
  • Loading branch information
karl-johan-grahn authored Apr 10, 2024
1 parent 6625223 commit f63139f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .vale.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
StylesPath = styles
MinAlertLevel = warning

Packages = https://github.com/stakater/vale-package/releases/download/v0.0.4/Stakater.zip
Packages = https://github.com/stakater/vale-package/releases/download/v0.0.15/Stakater.zip
Vocab = Stakater

# Only check MarkDown files
Expand Down
22 changes: 15 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,33 @@ Python 3 environment

### 1. Import as git submodule

Add the submodule to your target Mkdocs project at `theme_common` path. You can learn more about the git submodules [here](https://git-scm.com/book/en/v2/Git-Tools-Submodules).
Add this repo as a submodule to your target Mkdocs project at the `theme_common` path:

### 2. Directory structure in target project
```sh
git submodule add [email protected]:stakater/stakater-docs-mkdocs-theme.git theme_common
```

Your target project directory should look like this after adding the submodule:

```sh
```txt
your-project/
theme_common/
...
```

In order to override the `theme_common`, you can mirror this directory in your target project as `theme_override` and customise the files there as you need. Directory structure would look like this after that:
You can learn more about git submodules [here](https://git-scm.com/book/en/v2/Git-Tools-Submodules).

```sh
### 2. Directory structure in target project

To override the `theme_common`, create a `theme_override` folder and customise the files there as you need. Directory structure would look like this after that:

```txt
your-project/
theme_common/
theme_override/
```

In your `theme_override` folder, you can replace `mkdocs.yml` with the following starting template:
In your `theme_override` folder, you could for example override `mkdocs.yml` in the common theme by creating the same file in the `theme_override` folder:

```yaml
site_name: <project name>
Expand Down Expand Up @@ -58,7 +64,7 @@ You can visit MkDocs official documentation to find out how to define `nav` in `

Target project's directory structure would look like this after adding `content` dir:

```sh
```txt
your-project/
theme_common/
theme_override/
Expand Down Expand Up @@ -93,3 +99,5 @@ execute the following commands in the root of your target project:
> 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.
3 changes: 0 additions & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ extra:
as to measure the effectiveness of our documentation and whether users
find what they're searching for. With your consent, you're helping us to
make our documentation better.
version:
provider: mike
default: latest
plugins:
- search
- mermaid2
Expand Down
4 changes: 2 additions & 2 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
".vale.ini"
],
"matchStrings": [
"https:\/\/github.com\/(?<depName>.*)\/releases\/download\/(?<currentValue>.*)\/.*.tar.gz"
"https:\/\/github\\.com\/(?<depName>.*)\/releases\/download\/(?<currentValue>.*)\/.*\\.zip"
],
"datasourceTemplate": "github-release-attachments"
"datasourceTemplate": "github-releases"
}
]
}

0 comments on commit f63139f

Please sign in to comment.