Skip to content

Commit 0945f42

Browse files
authored
Merge branch 'main' into patch-1
2 parents b1bfe3b + f49cf7f commit 0945f42

File tree

29 files changed

+607
-300
lines changed

29 files changed

+607
-300
lines changed

.markdownlint-cli2.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# cSpell:ignore docsy github lookandfeel iconsimages
22

3+
customRules:
4+
- ./scripts/_md-rules/link-rules.mjs
5+
36
globs:
47
- '!docsy.dev/**'
58
- '!layouts/**'

.markdownlint.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,10 @@ no-inline-html: false
1515
no-trailing-punctuation: false
1616
no-trailing-spaces: { br_spaces: 0, strict: true}
1717
# table-column-style: false
18+
19+
# Link-validation rules (from scripts/_md-rules/link-rules.mjs)
20+
21+
no-docsy-dev-external-urls:
22+
pattern: 'https?://(?:www\.)?docsy\.dev/'
23+
message: Use a site-relative path instead of the full docsy.dev URL.
24+
replace: '/'

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Changelog
22

3+
<!-- markdownlint-disable no-docsy-dev-external-urls -->
4+
35
The changelog is published online, see
46
[Changelog](https://www.docsy.dev/project/about/changelog/) or the
57
[page source](docsy.dev/content/en/project/about/changelog.md).

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Contributing
22

3+
<!-- markdownlint-disable no-docsy-dev-external-urls -->
4+
35
The contributing page is published online, see
46
[Contributing](https://www.docsy.dev/docs/contributing/) or the
57
[page source](docsy.dev/content/en/docs/contributing.md).

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Docsy
22

3+
<!-- markdownlint-disable no-docsy-dev-external-urls -->
4+
35
Docsy is a [Hugo](https://gohugo.io) theme for technical documentation sets,
46
providing simple navigation, site structure, and more.
57

@@ -106,9 +108,6 @@ This project is licensed under the Apache License 2.0, see
106108
[deploys]: https://app.netlify.com/sites/docsydocs/deploys
107109
[main-preview]: https://main--docsydocs.netlify.app/
108110
[netlify]: https://netlify.com
109-
110-
<!-- FIXME: once 0.14.0 is released, update the link to the changelog page -->
111-
112111
[official-support]:
113112
https://www.docsy.dev/project/about/changelog/#official-support
114113
[releases]: https://github.com/google/docsy/releases

assets/scss/td/_nav.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,12 @@ $td-link-underline-offsets: (
162162
content: ' (latest)';
163163
}
164164
}
165+
166+
&-next {
167+
&::after {
168+
content: ' (next)';
169+
}
170+
}
165171
}
166172
}
167173

docsy.dev/config/_default/params.yaml

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,26 @@
66
# version:
77
# status: archived # Then fetch include
88

9-
version: &docsyVersion 0.14.4-dev
10-
tdBuildId: 020-over-main-4a09247b
11-
versionLatest: &versionLatest v0.14.3
12-
version_menu: *docsyVersion
9+
tdVersion:
10+
latest: &tdLatestVers v0.14.3
11+
dev: &tdDevVers v0.14.4-dev
12+
buildId: &tdBuildId 024-over-main-500ee239
13+
14+
version: *tdDevVers
15+
version_menu: *tdDevVers
1316
version_menu_pagelinks: true
1417
versions:
15-
# - name: '**About**'
16-
# url: /project
17-
# pagelinks: false
18-
# - name: ---
1918
- name: '**Versions**'
20-
- name: Next
21-
version: *docsyVersion
22-
# TODO: use https://next.docsy.dev once it's available
23-
url: https://main--docsydocs.netlify.app
24-
- version: *versionLatest
25-
url: https://www.docsy.dev
19+
- version: *tdDevVers
20+
# kind: next
21+
pagelinks: true
22+
url: https://main--docsydocs.netlify.app # TODO: use next.docsy.dev once available
23+
- version: *tdLatestVers
2624
kind: latest
25+
url: https://www.docsy.dev
2726
- name: ---
2827
- name: '**Variant**'
29-
- name: Doc-rooted
30-
url: https://doc-rooted--docsydocs.netlify.app
31-
# TODO: implement /docs/* redirects for doc-rooted site, then drop pagelinks:false
32-
pagelinks: false
28+
- name: Doc-rooted (experimental)
3329
kind: home
34-
# - name: Goldydocs
35-
# url: https://example.docsy.dev
36-
# pagelinks: false
30+
pagelinks: false # TODO: drop this once /docs/* redirects are implemented
31+
url: https://doc-rooted--docsydocs.netlify.app
Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,26 @@
11
# cSpell:ignore pagelinks
22

3-
version: &docsyVersion 0.14.3
4-
version_menu: *docsyVersion
3+
tdVersion:
4+
latest: &tdLatestVers v0.14.3
5+
dev: &tdDevVers v0.14.4-dev
6+
buildId: &tdBuildId 024-over-main-500ee239
7+
8+
version: &tdDocRootedVers Doc-rooted of Next
9+
version_menu: *tdLatestVers
10+
version_menu_pagelinks: false
511
versions:
12+
- name: '**Versions**'
613
- name: Next
7-
kind: next
8-
url: https://main--docsydocs.netlify.app/
9-
pagelinks: false
10-
- version: *docsyVersion
14+
version: *tdDevVers
15+
# kind: next
16+
url: https://main--docsydocs.netlify.app
17+
- version: *tdLatestVers
1118
kind: latest
1219
url: https://www.docsy.dev
13-
pagelinks: false
20+
- name: ---
21+
- name: '**Variant**'
22+
- name: Doc-rooted (experimental)
23+
version: *tdDocRootedVers
24+
kind: home
25+
pagelinks: false # TODO: drop this once /docs/* redirects are implemented
26+
url: https://doc-rooted--docsydocs.netlify.app

docsy.dev/config/production/params.yaml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
# cSpell:ignore pagelinks
22

3-
version: &docsyVersion 0.14.3
4-
version_menu: *docsyVersion
3+
tdVersion:
4+
latest: &tdLatestVers v0.14.3
5+
dev: &tdDevVers v0.14.4-dev
6+
buildId: &tdBuildId 024-over-main-500ee239
7+
8+
version: *tdLatestVers
9+
version_menu: *tdLatestVers
510
versions:
11+
- name: '**Versions**'
612
- name: Next
7-
kind: next
8-
url: https://main--docsydocs.netlify.app/
9-
pagelinks: true
10-
- version: *docsyVersion
13+
version: *tdDevVers
14+
# kind: next
15+
url: https://main--docsydocs.netlify.app
16+
- version: *tdLatestVers
1117
kind: latest
1218
url: https://www.docsy.dev
13-
pagelinks: true

docsy.dev/content/en/docs/content/adding-content.md

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ about how to add content and use each of Docsy's templates.
136136

137137
## Doc-rooted sites <a id="alternative-site-structure"></a>
138138

139+
{{%_param BADGE EXPERIMENTAL info %}}
140+
139141
Docsy supports documentation-first websites through a **doc-rooted** site
140142
structure, where:
141143

@@ -147,7 +149,7 @@ structure, where:
147149
As a consequence, the `docs` section landing page becomes the site home page. A
148150
doc-rooted site has the following benefits:
149151

150-
- Produces cleaner, documentation-focused URLs (no `/docs/` prefix).
152+
- Produces simpler, documentation-focused URLs (no `/docs/` prefix).
151153
- Avoids the need to create a custom home page using [blocks][] shortcodes or
152154
HTML.
153155

@@ -162,25 +164,37 @@ permalinks:
162164
docs: /:sections[1:]
163165
```
164166
165-
> [!CAUTION]
166-
>
167-
> Check for root-level URL path conflicts between doc and non-doc sections or
168-
> pages (for example, `/blog/` and `/community/`). If conflicts exist, rename
169-
> the conflicting non-doc paths or keep docs under `/docs/`.
167+
Because the docs section landing page now serves as the home page, you need to
168+
add extra configuration to avoid "Duplicate target paths" warnings and avoid
169+
render conflicts with the site-root index file.
170+
171+
Add the following front matter to each site root index file (one per language in
172+
multilingual sites):
173+
174+
```yaml
175+
build: { render: link }
176+
```
170177
171178
For an example of a doc-rooted variant of this site, see the [Doc-rooted
172179
example][] variant.
173180
174181
[Doc-rooted example]: https://doc-rooted--docsydocs.netlify.app
175182
176-
> [!NOTE] Legacy _docs-only_ setup
177-
>
178-
> Earlier versions of this page described a docs-only configuration that used a
179-
> front matter `cascade` to set page `type` values.
180-
>
181-
> That approach is no longer supported and can produce incorrect behavior. If
182-
> you are migrating from that setup, remove the `cascade` rule and configure
183-
> doc-rooted permalinks as described above.
183+
### Check for path conflicts
184+
185+
If your doc-rooted site has non-docs pages (such as blog or community pages),
186+
check for possible root-level path conflicts between docs and non-docs pages. To
187+
have Hugo report duplicate path warnings when building your site, use the
188+
`--printPathWarnings` flag.
189+
190+
### Legacy _docs-only_ setup
191+
192+
Earlier versions of this page described a docs-only configuration that used a
193+
front matter `cascade` to set page `type` values.
194+
195+
That approach is no longer supported and can produce incorrect behavior. If you
196+
are migrating from that setup, remove the old `cascade` entries and use the
197+
configuration described earlier in this section.
184198

185199
## Page front matter
186200

0 commit comments

Comments
 (0)