Skip to content

Commit c027ce4

Browse files
authored
Merge pull request #68 from SpineEventEngine/spine-hugo-theme
Use Spine `site-commons`
2 parents 62120db + 5424abc commit c027ce4

188 files changed

Lines changed: 87 additions & 26715 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

SPINE_RELEASE.md

Lines changed: 34 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,45 @@ Release new version of the documentation
22
========
33

44
**Table of Contents**
5-
* [Release major version](#release-major-version)
5+
* [Release new version](#release-new-version)
66
* [Release steps](#release-steps)
77
* [URLs](#urls)
88

9-
## Release major version
9+
## Release new version
1010

1111
This site supports documentation versioning. All links within the
1212
documentation are rendered automatically.
1313

1414
The versions are managed in the `docs/data/versions.yml` file.
1515

1616
```yml
17-
- short: "1"
18-
full: 1.9.0
19-
path: docs
17+
- version_id: "1"
18+
label: 1.9.0
19+
content_path: docs/1
20+
route_url: docs
2021
is_main: true
2122
switcher:
2223
visible: false
2324
item_visible: false
24-
- short: "2"
25-
full: 2.0.0
26-
path: docs/2
25+
- version_id: "2-0-x"
26+
label: 2.0.x
27+
content_path: docs/2-0-x
28+
route_url: docs/2-0-x
2729
switcher:
2830
visible: false
2931
item_visible: false
3032
```
3133
3234
Where:
3335
34-
* `short` shows the major version number, which will be used primarily for the link generation.
35-
* `full` the full version that will be visible in the version switcher.
36-
* `path` will be used when generating links inside a documentation version.
37-
* `is_main` the optional flag that marks the current main version.
36+
* `version_id` – a major or minor version identifier used to generate the correct side navigation structure.
37+
* `label` – the full version label displayed in the version switcher and available via the `{{< version >}}` shortcode.
38+
* `content_path` – the relative path (from the `content/` directory) to the documentation files for this version.
39+
* `route_url` – the base URL used when generating internal links within this documentation version.
40+
* `is_main` – optional flag indicating that this version is the main documentation version.
3841
* `switcher`:
39-
* `visible` specifies whether the version switcher will be visible on the page.
40-
* `item_visible` specifies whether the version will be available in the switcher dropdown.
42+
* `visible` specifies whether the version switcher will be visible on the page.
43+
* `item_visible` specifies whether the version will be available in the switcher dropdown.
4144

4245
The `switcher` component is under development.
4346

@@ -51,7 +54,7 @@ content
5154
│ ├── client-libs
5255
│ ├── quick-start
5356
│ └── _index.md
54-
└── 2
57+
└── 2-0-x
5558
├── client-libs
5659
├── quick-start
5760
└── _index.md
@@ -60,12 +63,14 @@ content
6063
Also, each version should have its own `sidenav` config inside
6164
the `data/docs/<version>` directory.
6265
66+
For modules with documentation, the config should live in `data/docs/<module>/<version>`.
67+
6368
```
6469
data
6570
└── docs
6671
├── 1
6772
│ └── sidenav.yml
68-
└── 2
73+
└── 2-0-x
6974
└── sidenav.yml
7075
```
7176
@@ -75,39 +80,29 @@ data
7580
2. Create the `sidenav.yml` inside `data/docs/<new-version>/` directory.
7681
3. Update the `data/versions.yml` config.
7782
78-
For example, if you release the version `2` as the main version,
83+
For example, if you release the version `2-0-x` as the main version,
7984
the config should be updated as follows:
80-
85+
8186
```yml
82-
- short: "1"
83-
full: 1.9.0
84-
path: docs # Change the path from `docs` to `docs/1`.
85-
is_main: true # Change the flag to `false` or delete the line.
87+
- version_id: "1"
88+
label: 1.9.0
89+
content_path: docs/1
90+
route_url: docs # Change the route from `docs` to `docs/1`.
91+
is_main: true # Change the flag to `false` or delete the line.
8692
switcher:
8793
visible: false
8894
item_visible: false
89-
- short: "2"
90-
full: 2.0.0-eap # Change the version to `2.0.0` if needed.
91-
path: docs/2 # Change the path from `docs/2` to `docs`.
92-
is_main: false # Set `is_main` as `true`.
95+
- version_id: "2-0-x"
96+
label: 2.0.x
97+
content_path: docs/2-0-x # Change the content path to `docs` if the documentation will be copied to the root.
98+
route_url: docs/2-0-x # Change the route from `docs/2-0-x` to `docs`.
99+
is_main: false # Set `is_main` as `true`.
93100
switcher:
94101
visible: false
95102
item_visible: false
96103
```
97104
98-
4. Update the `site/config/_default/hugo.toml` to make the version `2` as main.
99-
100-
- Navigate to the end of the file to the section "Version control config".
101-
- Find the `path` parameters and update as follows:
102-
```
103-
path = '{/docs/1}' -> path = '{/docs/2}'
104-
path = '{/docs/1/**}' -> path = '{/docs/2/**}'
105-
```
106-
107-
Now the version `2` will be available at the `<domain>/docs/` URL and
108-
will be opened by default.
109-
110-
5. Commit and push the new version release.
105+
4. Commit and push the new version release.
111106
112107
Get updates into the main website:
113108

docs/_preview/.browserslistrc

Lines changed: 0 additions & 2 deletions
This file was deleted.

docs/_preview/assets/scss/docs/_home.scss

Lines changed: 0 additions & 64 deletions
This file was deleted.

docs/_preview/assets/scss/docs/_layout.scss

Lines changed: 0 additions & 37 deletions
This file was deleted.

docs/_preview/assets/scss/main.scss

Lines changed: 0 additions & 36 deletions
This file was deleted.

docs/_preview/config/_default/hugo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,17 @@ disableKinds = ['taxonomy', 'term']
88
[[module.imports]]
99
path = '../..'
1010
[[module.imports]]
11-
path = 'github.com/TeamDev-Ltd/site-commons'
11+
path = 'github.com/SpineEventEngine/site-commons'
1212

1313
# Enables HTML rendering in markdown files.
1414
[markup]
1515
[markup.goldmark]
1616
[markup.goldmark.renderer]
1717
unsafe = true
18+
[markup.goldmark.parser]
19+
[markup.goldmark.parser.attribute]
20+
block = true
21+
title = true
1822
[markup.highlight]
1923
noClasses = false
2024

docs/_preview/content/_index.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ Go to the [documentation section](docs/).
88

99
Read the [Authoring][authoring] guide on adding the content to the documentation.
1010

11-
<p class="subtle">The page is only available on this site and will not be
12-
rendered on the <a href="https://spine.io">spine.io</a>.</p>
11+
The page is only available on this site and will not be rendered on the
12+
[spine.io](https://spine.io).
13+
{class="subtle"}
1314

1415
[authoring]: https://github.com/SpineEventEngine/SpineEventEngine.github.io/blob/master/AUTHORING.md

docs/_preview/go.mod

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
module github.com/SpineEventEngine/documentation/site
1+
module github.com/SpineEventEngine/documentation/docs/_preview
22

33
go 1.22.0
44

5-
require github.com/TeamDev-Ltd/site-commons v0.0.0-20251202150534-a795438915ff // indirect
5+
require (
6+
github.com/SpineEventEngine/site-commons v0.0.0-20260212124406-a312b6eab34c // indirect
7+
github.com/SpineEventEngine/validation/docs v0.0.0-20260205202311-181ba8844107 // indirect
8+
github.com/gohugoio/hugo-mod-bootstrap-scss/v5 v5.20300.20400 // indirect
9+
github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2 v2.21100.20000 // indirect
10+
github.com/twbs/bootstrap v5.3.8+incompatible // indirect
11+
)

docs/_preview/go.sum

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
1-
github.com/TeamDev-Ltd/site-commons v0.0.0-20251202150534-a795438915ff h1:8kjfGJhf6LeS+IlK9NRktxtcv6O/WDneBuQD3QLPGIs=
2-
github.com/TeamDev-Ltd/site-commons v0.0.0-20251202150534-a795438915ff/go.mod h1:atDeksDWBzsIidpW6Ivz2yYHwp2JPa1i1KXIxkctQ3c=
1+
github.com/SpineEventEngine/site-commons v0.0.0-20260212124406-a312b6eab34c h1:NtLNdAfuL3uQB+8cU5sBzx+2tlRXlxd1+76okBWj0Ek=
2+
github.com/SpineEventEngine/site-commons v0.0.0-20260212124406-a312b6eab34c/go.mod h1:tkAl4StIREKmz9r5PiJtuDhvwMMkFXKWcaTyxhIikho=
3+
github.com/SpineEventEngine/validation/docs v0.0.0-20260205202311-181ba8844107 h1:2DHRIwwLudP6l3Kh7Nd4KR4uXcsDtIAXE9adW68ivME=
4+
github.com/SpineEventEngine/validation/docs v0.0.0-20260205202311-181ba8844107/go.mod h1:STHyjXejVvPmfrxujfDvhofmjg55mMk+fwI3TVL0b4Y=
5+
github.com/gohugoio/hugo-mod-bootstrap-scss/v5 v5.20300.20400 h1:L6+F22i76xmeWWwrtijAhUbf3BiRLmpO5j34bgl1ggU=
6+
github.com/gohugoio/hugo-mod-bootstrap-scss/v5 v5.20300.20400/go.mod h1:uekq1D4ebeXgduLj8VIZy8TgfTjrLdSl6nPtVczso78=
7+
github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2 v2.21100.20000 h1:GZxx4Hc+yb0/t3/rau1j8XlAxLE4CyXns2fqQbyqWfs=
8+
github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2 v2.21100.20000/go.mod h1:mFberT6ZtcchrsDtfvJM7aAH2bDKLdOnruUHl0hlapI=
9+
github.com/twbs/bootstrap v5.3.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
10+
github.com/twbs/bootstrap v5.3.8+incompatible h1:eK1fsXP7R/FWFt+sSNmmvUH9usPocf240nWVw7Dh02o=
11+
github.com/twbs/bootstrap v5.3.8+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=

docs/_preview/layouts/_default/baseof.html

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)