Skip to content

Commit 7a82d78

Browse files
authored
Add version menu to site, improve version partial, and more (#2557)
1 parent cf4f514 commit 7a82d78

File tree

17 files changed

+703
-307
lines changed

17 files changed

+703
-307
lines changed

assets/scss/td/_nav.scss

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ $td-link-underline-offsets: (
111111
}
112112

113113
.td-light-dark-menu {
114-
position: unset !important;
114+
position: unset;
115115
display: flex;
116116
align-items: center;
117117
justify-content: center;
@@ -126,12 +126,29 @@ $td-link-underline-offsets: (
126126
}
127127
}
128128

129-
.td-lang-menu {
130-
position: unset !important;
129+
.td-lang-menu,
130+
.td-version-menu {
131+
position: unset;
131132
display: flex;
132133
align-items: center;
133134
justify-content: center;
134135

136+
.dropdown-item {
137+
position: relative;
138+
padding-left: 2.5rem;
139+
140+
&.active::before {
141+
font: var(--fa-font-solid);
142+
content: fa-content($fa-var-check);
143+
position: absolute;
144+
left: 0.75rem;
145+
top: 50%;
146+
transform: translateY(-50%);
147+
}
148+
}
149+
}
150+
151+
.td-lang-menu {
135152
&__title {
136153
padding-left: 0;
137154
padding-right: 0;
@@ -160,20 +177,6 @@ $td-link-underline-offsets: (
160177
}
161178
}
162179
}
163-
164-
.dropdown-item {
165-
position: relative;
166-
padding-left: 2.5rem;
167-
168-
&.active::before {
169-
font: var(--fa-font-solid);
170-
content: fa-content($fa-var-check);
171-
position: absolute;
172-
left: 0.75rem;
173-
top: 50%;
174-
transform: translateY(-50%);
175-
}
176-
}
177180
}
178181
}
179182

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# cSpell:ignore pagelinks
2+
#
3+
# Version related parameters
4+
#
5+
# archived_version: false # TODO: generalize status
6+
# version:
7+
# status: archived # Then fetch include
8+
9+
version: &docsyVersion 0.14.3-dev
10+
tdBuildId: 003-over-main-cf4f514b
11+
versionLatest: &versionLatest v0.14.2
12+
version_menu: *docsyVersion
13+
version_menu_pagelinks: true
14+
versions:
15+
- name: Next
16+
version: *docsyVersion
17+
url: https://main--docsydocs.netlify.app
18+
# TODO: use https://next.docsy.dev once it's available
19+
# kind: next
20+
- version: *versionLatest
21+
url: https://www.docsy.dev
22+
# kind: latest
23+
- name: ---
24+
- name: More coming soon...
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: &docsyVersion 0.14.2
2+
version_menu: *docsyVersion
3+
versions:
4+
- name: Next
5+
kind: next
6+
url: https://main--docsydocs.netlify.app/
7+
- version: *docsyVersion
8+
kind: latest
9+
url: https://www.docsy.dev

docsy.dev/content/en/docs/content/search.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ date: 2017-01-05
44
weight: 3.5
55
description: >
66
Let users search your Docsy site with a choice of configurable search options.
7-
cSpell:ignore: GCSE
7+
cSpell:ignore: GCSE docsearch websearch fsdu nryfng
88
---
99

1010
Docsy offers multiple options that let your readers search your site content, so

docsy.dev/content/en/project/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ Planned content organization (tentative):
3737

3838
## Site build information
3939

40-
Docsy version: `{{% _param versionWithBuildId %}}`
40+
Docsy version: `{{% version %}}`
4141

4242
{{% td/site-build-info/netlify team="docsydocs" %}}

docsy.dev/content/en/project/about/maintainer-notes.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,10 @@ before any further changes are merged into the `main` branch:
296296
297297
```console
298298
$ npm run -s fix:version
299-
✓ Updated version: 0.14.2 → 0.14.3-dev+001-over-main-24e96f1c
300-
✓ Updated hugo.yaml version: 0.14.2 → 0.14.3-dev
301-
✓ Updated hugo.yaml versionWithBuildId: 0.14.2 → 0.14.3-dev+001-over-main-24e96f1c
299+
✓ Updated package.json version: 0.14.3 → 0.14.3-dev+003-over-main-cf4f514b
300+
✓ Updated docsy.dev/config/_default/params.yaml version: 0.14.3 → 0.14.3-dev
301+
✓ Updated docsy.dev/config/_default/params.yaml tdBuildId: (none) → 003-over-main-cf4f514b
302+
...
302303
$ npm run -s fix:version:example
303304
...
304305
```

docsy.dev/hugo.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ params:
6262
to_year: present
6363
privacy_policy: https://policies.google.com/privacy
6464
archived_version: false
65-
version: 0.14.3-dev
66-
versionWithBuildId: 0.14.3-dev+002-over-main-4edd8f61
6765
github_repo: https://github.com/google/docsy
6866
github_project_repo: https://github.com/google/docsy
6967
github_subdir: docsy.dev
@@ -147,6 +145,7 @@ params:
147145
enable: true
148146
drawio:
149147
enable: true
148+
150149
# UG helpers: use with _param
151150
FA: <i class="fa-{1} fa-{2} text-{3} px-1"></i>
152151
FAS: <i class="fa-solid fa-{1} text-{2} px-1"></i>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{{ with .Site.Params.version -}}
2+
{{ . -}}
3+
{{ with $.Site.Params.tdBuildId -}}
4+
+{{ replace . "+" "-" -}}
5+
{{ end -}}
6+
{{ end -}}

0 commit comments

Comments
 (0)