Skip to content

Commit d81aa7c

Browse files
committed
Add in details about how to use mike for versioning docs
1 parent abad96f commit d81aa7c

File tree

9 files changed

+52
-28
lines changed

9 files changed

+52
-28
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ This document tracks the history and evolution of the **Open Data Contract Stand
99
* Change `slaProperties.valueExt` data type from `string` to `oneOf[string, number]`
1010
* Update [examples](docs/examples) to adhere to JSON schema
1111
* Full example from README directs to [full-example.yaml](docs/examples/all/full-example.yaml)
12+
* Add in mkdocs for creating documentation website
1213

1314
# v2.2.1 - 2023-12-18 - APPROVED
1415

README.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,27 @@ Formerly known as the data contract template, this standard is used to implement
6060
### How does PayPal use Data Contracts?
6161
PayPal uses data contracts in many ways, but this [article](https://medium.com/paypal-tech/the-next-generation-of-data-platforms-is-the-data-mesh-b7df4b825522) from the [PayPal Technology blog](https://medium.com/paypal-tech) gives a good introduction.
6262

63-
63+
### Mkdocs mike versioning
64+
To start with using [mike](https://github.com/jimporter/mike) as a tool for versioning the documentation, the following was run:
65+
66+
```bash
67+
pip install mike
68+
cd open-data-contract-standard #ensure you are inside the repo
69+
mike deploy --push --update-aliases v2.2.1 latest #set latest version to v2.2.1
70+
mike set-default --push latest #by default, users will go to latest
71+
```
72+
73+
#### Deploying a new version
74+
Given that the Github action [here](.github/workflows/docs-site-deploy.yaml) it set to trigger when a new tag version is
75+
created, all that is required is to:
76+
1. [Create a new release](https://github.com/bitol-io/open-data-contract-standard/releases)
77+
2. Put in new tag version for release (follows pattern v*)
78+
3. Once release is created with new tag version, the Github action gets kicked off and mike will deploy the latest documentation linked to latest version tag
79+
80+
#### Delete version
81+
If a version tag was pushed that was incorrect, it can be deleted via:
82+
83+
```bash
84+
mike deploy --push --update-aliases <previous tag version> latest #set latest version to previous tag version
85+
mike delete <incorrect tag> --push
86+
```

site/404.html

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515

1616

17-
<link rel="icon" href="/open-data-contract-standard/img/Bitol_Logo_icon_color.svg">
17+
<link rel="icon" href="/open-data-contract-standard/v2.2.1/img/Bitol_Logo_icon_color.svg">
1818
<meta name="generator" content="mkdocs-1.5.3, mkdocs-material-9.4.2+insiders-4.42.0">
1919

2020

@@ -23,10 +23,10 @@
2323

2424

2525

26-
<link rel="stylesheet" href="/open-data-contract-standard/assets/stylesheets/main.63a9ca82.min.css">
26+
<link rel="stylesheet" href="/open-data-contract-standard/v2.2.1/assets/stylesheets/main.63a9ca82.min.css">
2727

2828

29-
<link rel="stylesheet" href="/open-data-contract-standard/assets/stylesheets/palette.46987102.min.css">
29+
<link rel="stylesheet" href="/open-data-contract-standard/v2.2.1/assets/stylesheets/palette.46987102.min.css">
3030

3131

3232

@@ -45,7 +45,7 @@
4545

4646

4747

48-
<script>__md_scope=new URL("/open-data-contract-standard/",location),__md_hash=e=>[...e].reduce((e,_)=>(e<<5)-e+_.charCodeAt(0),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
48+
<script>__md_scope=new URL("/open-data-contract-standard/v2.2.1",location),__md_hash=e=>[...e].reduce((e,_)=>(e<<5)-e+_.charCodeAt(0),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
4949

5050

5151

@@ -81,9 +81,9 @@
8181

8282
<header class="md-header" data-md-component="header">
8383
<nav class="md-header__inner md-grid" aria-label="Header">
84-
<a href="/open-data-contract-standard/." title="Open Data Contract Standard" class="md-header__button md-logo" aria-label="Open Data Contract Standard" data-md-component="logo">
84+
<a href="/open-data-contract-standard/v2.2.1/." title="Open Data Contract Standard" class="md-header__button md-logo" aria-label="Open Data Contract Standard" data-md-component="logo">
8585

86-
<img src="/open-data-contract-standard/img/Bitol_Logo_icon_color.svg" alt="logo">
86+
<img src="/open-data-contract-standard/v2.2.1/img/Bitol_Logo_icon_color.svg" alt="logo">
8787

8888
</a>
8989
<label class="md-header__button md-icon" for="__drawer">
@@ -181,7 +181,7 @@
181181

182182

183183
<li class="md-tabs__item">
184-
<a href="/open-data-contract-standard/." class="md-tabs__link">
184+
<a href="/open-data-contract-standard/v2.2.1/." class="md-tabs__link">
185185

186186

187187

@@ -198,7 +198,7 @@
198198

199199

200200
<li class="md-tabs__item">
201-
<a href="/open-data-contract-standard/standard/" class="md-tabs__link">
201+
<a href="/open-data-contract-standard/v2.2.1/standard/" class="md-tabs__link">
202202

203203

204204

@@ -215,7 +215,7 @@
215215

216216

217217
<li class="md-tabs__item">
218-
<a href="/open-data-contract-standard/examples/" class="md-tabs__link">
218+
<a href="/open-data-contract-standard/v2.2.1/examples/" class="md-tabs__link">
219219

220220

221221

@@ -232,7 +232,7 @@
232232

233233

234234
<li class="md-tabs__item">
235-
<a href="/open-data-contract-standard/contributing/" class="md-tabs__link">
235+
<a href="/open-data-contract-standard/v2.2.1/contributing/" class="md-tabs__link">
236236

237237

238238

@@ -268,9 +268,9 @@
268268

269269
<nav class="md-nav md-nav--primary md-nav--lifted md-nav--integrated" aria-label="Navigation" data-md-level="0">
270270
<label class="md-nav__title" for="__drawer">
271-
<a href="/open-data-contract-standard/." title="Open Data Contract Standard" class="md-nav__button md-logo" aria-label="Open Data Contract Standard" data-md-component="logo">
271+
<a href="/open-data-contract-standard/v2.2.1/." title="Open Data Contract Standard" class="md-nav__button md-logo" aria-label="Open Data Contract Standard" data-md-component="logo">
272272

273-
<img src="/open-data-contract-standard/img/Bitol_Logo_icon_color.svg" alt="logo">
273+
<img src="/open-data-contract-standard/v2.2.1/img/Bitol_Logo_icon_color.svg" alt="logo">
274274

275275
</a>
276276
Open Data Contract Standard
@@ -296,7 +296,7 @@
296296

297297

298298
<li class="md-nav__item">
299-
<a href="/open-data-contract-standard/." class="md-nav__link">
299+
<a href="/open-data-contract-standard/v2.2.1/." class="md-nav__link">
300300

301301

302302
<span class="md-ellipsis">
@@ -321,7 +321,7 @@
321321

322322

323323
<li class="md-nav__item">
324-
<a href="/open-data-contract-standard/standard/" class="md-nav__link">
324+
<a href="/open-data-contract-standard/v2.2.1/standard/" class="md-nav__link">
325325

326326

327327
<span class="md-ellipsis">
@@ -346,7 +346,7 @@
346346

347347

348348
<li class="md-nav__item">
349-
<a href="/open-data-contract-standard/examples/" class="md-nav__link">
349+
<a href="/open-data-contract-standard/v2.2.1/examples/" class="md-nav__link">
350350

351351

352352
<span class="md-ellipsis">
@@ -371,7 +371,7 @@
371371

372372

373373
<li class="md-nav__item">
374-
<a href="/open-data-contract-standard/contributing/" class="md-nav__link">
374+
<a href="/open-data-contract-standard/v2.2.1/contributing/" class="md-nav__link">
375375

376376

377377
<span class="md-ellipsis">
@@ -493,12 +493,12 @@ <h1>404 - Not found</h1>
493493
</div>
494494

495495

496-
<script id="__config" type="application/json">{"base": "/open-data-contract-standard/", "features": ["navigation.tabs", "navigation.sections", "navigation.instant", "navigation.instant.prefetch", "navigation.tracking", "navigation.top", "navigation.footer", "navigation.path", "content.code.copy", "content.code.select", "content.tabs.link", "toc.integrate", "toc.follow"], "search": "/open-data-contract-standard/assets/javascripts/workers/search.f2da59ea.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": {"provider": "mike"}}</script>
496+
<script id="__config" type="application/json">{"base": "/open-data-contract-standard/v2.2.1", "features": ["navigation.tabs", "navigation.sections", "navigation.instant", "navigation.instant.prefetch", "navigation.tracking", "navigation.top", "navigation.footer", "navigation.path", "content.code.copy", "content.code.select", "content.tabs.link", "toc.integrate", "toc.follow"], "search": "/open-data-contract-standard/v2.2.1/assets/javascripts/workers/search.f2da59ea.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": {"provider": "mike"}}</script>
497497

498498

499-
<script src="/open-data-contract-standard/assets/javascripts/bundle.ef51cdc3.min.js"></script>
499+
<script src="/open-data-contract-standard/v2.2.1/assets/javascripts/bundle.ef51cdc3.min.js"></script>
500500

501-
<script src="/open-data-contract-standard/js/open_in_new_tab.js"></script>
501+
<script src="/open-data-contract-standard/v2.2.1/js/open_in_new_tab.js"></script>
502502

503503

504504
</body>

site/contributing/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99

1010

11-
<link rel="canonical" href="https://pflooky.github.io/open-data-contract-standard/contributing/">
11+
<link rel="canonical" href="https://pflooky.github.io/open-data-contract-standard/v2.2.1/contributing/">
1212

1313

1414
<link rel="prev" href="../examples/">

site/examples/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99

1010

11-
<link rel="canonical" href="https://pflooky.github.io/open-data-contract-standard/examples/">
11+
<link rel="canonical" href="https://pflooky.github.io/open-data-contract-standard/v2.2.1/examples/">
1212

1313

1414
<link rel="prev" href="../standard/">

site/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99

1010

11-
<link rel="canonical" href="https://pflooky.github.io/open-data-contract-standard/">
11+
<link rel="canonical" href="https://pflooky.github.io/open-data-contract-standard/v2.2.1/">
1212

1313

1414

site/sitemap.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
33
<url>
4-
<loc>https://pflooky.github.io/open-data-contract-standard/</loc>
4+
<loc>https://pflooky.github.io/open-data-contract-standard/v2.2.1/</loc>
55
<lastmod>2024-02-27</lastmod>
66
<changefreq>daily</changefreq>
77
</url>
88
<url>
9-
<loc>https://pflooky.github.io/open-data-contract-standard/contributing/</loc>
9+
<loc>https://pflooky.github.io/open-data-contract-standard/v2.2.1/contributing/</loc>
1010
<lastmod>2024-02-27</lastmod>
1111
<changefreq>daily</changefreq>
1212
</url>
1313
<url>
14-
<loc>https://pflooky.github.io/open-data-contract-standard/standard/</loc>
14+
<loc>https://pflooky.github.io/open-data-contract-standard/v2.2.1/standard/</loc>
1515
<lastmod>2024-02-27</lastmod>
1616
<changefreq>daily</changefreq>
1717
</url>
1818
<url>
19-
<loc>https://pflooky.github.io/open-data-contract-standard/examples/</loc>
19+
<loc>https://pflooky.github.io/open-data-contract-standard/v2.2.1/examples/</loc>
2020
<lastmod>2024-02-27</lastmod>
2121
<changefreq>daily</changefreq>
2222
</url>

site/sitemap.xml.gz

7 Bytes
Binary file not shown.

site/standard/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99

1010

11-
<link rel="canonical" href="https://pflooky.github.io/open-data-contract-standard/standard/">
11+
<link rel="canonical" href="https://pflooky.github.io/open-data-contract-standard/v2.2.1/standard/">
1212

1313

1414
<link rel="prev" href="..">

0 commit comments

Comments
 (0)