Skip to content

Commit a31accb

Browse files
committed
Eliminate duplicate sidebar.yml files, generate it when building docs using sidebar.reference.yml and sidebar.nightly.template.yml.
1 parent e2d23ed commit a31accb

File tree

7 files changed

+180
-305
lines changed

7 files changed

+180
-305
lines changed

docs/_layouts/static-site-main.html

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,7 @@
44

55
<div class="site-container">
66
<div id="site-header"></div>
7-
{% if page.nightlyOf %}
8-
<aside class="warning">
9-
<div class='icon'></div>
10-
<div class='content'>
11-
This is a nightly documentation. The content of this page may not be
12-
consistent with the current stable version of language. Click
13-
<a href="{{ page.nightlyOf }}">here</a> to find the stable version of this
14-
page.
15-
</div>
16-
</aside>
17-
{% endif %} {{ content }}
7+
{{ content }}
188
<div class="divider" />
199
<nav class="arrow-navigation" aria-label="Page navigation">
2010
{% if page.previous %}

docs/sidebar.nightly.template.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
index: index.md
2+
subsection:
3+
- title: Reference
4+
directory: docs/reference
5+
# Embed sidebar.reference.yml, performed by `generateScalaDocumentation` sbt task
6+
- title: Contributing
7+
directory: docs/contributing
8+
index: contributing/index.md
9+
subsection:
10+
- page: contributing/getting-started.md
11+
- page: contributing/setting-up-your-ide.md
12+
- index: contributing/issues/diagnosing-your-issue.md
13+
subsection:
14+
- page: contributing/issues/reproduce.md
15+
- page: contributing/issues/cause.md
16+
- page: contributing/issues/areas.md
17+
- index: contributing/debugging/debugging.md
18+
subsection:
19+
- page: contributing/debugging/ide-debugging.md
20+
- page: contributing/debugging/inspection.md
21+
- page: contributing/debugging/other-debugging.md
22+
- page: contributing/testing.md
23+
- page: contributing/scaladoc.md
24+
- page: contributing/community-build.md
25+
- page: contributing/sending-in-a-pr.md
26+
- page: contributing/cheatsheet.md
27+
- title: Procedures
28+
directory: procedures
29+
index: contributing/procedures/index.md
30+
subsection:
31+
- page: contributing/procedures/release.md
32+
- page: contributing/procedures/vulpix.md
33+
- title: High Level Architecture
34+
directory: architecture
35+
index: contributing/architecture/index.md
36+
subsection:
37+
- page: contributing/architecture/lifecycle.md
38+
- page: contributing/architecture/context.md
39+
- page: contributing/architecture/phases.md
40+
- page: contributing/architecture/types.md
41+
- page: contributing/architecture/time.md
42+
- page: contributing/architecture/symbols.md
43+
- title: Internals
44+
directory: docs/internals
45+
index: internals/index.md
46+
subsection:
47+
- page: internals/backend.md
48+
- page: internals/classpaths.md
49+
- page: internals/contexts.md
50+
- page: internals/dotc-scalac.md
51+
- page: internals/higher-kinded-v2.md
52+
- page: internals/overall-structure.md
53+
- page: internals/explicit-nulls.md
54+
- page: internals/periods.md
55+
- page: internals/syntax.md
56+
- page: internals/type-system.md
57+
- page: internals/dotty-internals-1-notes.md
58+
- page: internals/debug-macros.md
59+
- page: internals/gadts.md
60+
- page: internals/coverage.md
61+
- page: internals/best-effort-compilation.md
62+
- page: release-notes-0.1.2.md # Referenced from https://www.scala-lang.org/blog/2017/05/31/first-dotty-milestone-release.html
63+
hidden: true

project/resources/referenceReplacements/sidebar.yml renamed to docs/sidebar.reference.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,13 @@ subsection:
2828
directory: contextual
2929
subsection:
3030
- page: reference/contextual/givens.md
31-
- page: reference/contextual/deferred-givens.md
32-
- page: reference/contextual/more-givens.md
33-
- page: reference/contextual/previous-givens.md
3431
- page: reference/contextual/using-clauses.md
3532
- page: reference/contextual/context-bounds.md
33+
- page: reference/contextual/deferred-givens.md
3634
- page: reference/contextual/given-imports.md
35+
- page: reference/contextual/more-givens.md
36+
- page: reference/contextual/previous-givens.md
37+
hidden: true
3738
- page: reference/contextual/extension-methods.md
3839
- page: reference/contextual/right-associative-extension-methods.md
3940
- page: reference/contextual/type-classes.md
@@ -54,10 +55,10 @@ subsection:
5455
- page: reference/metaprogramming/macros.md
5556
- page: reference/metaprogramming/macros-spec.md
5657
hidden: true
58+
- page: reference/metaprogramming/simple-smp.md # description of a simplified metaprogramming language, this might not be the best place for it
5759
- page: reference/metaprogramming/staging.md
5860
- page: reference/metaprogramming/reflection.md
5961
- page: reference/metaprogramming/tasty-inspect.md
60-
- page: reference/metaprogramming/simple-smp.md
6162
- title: Other New Features
6263
index: reference/other-new-features/other-new-features.md
6364
subsection:
@@ -67,6 +68,7 @@ subsection:
6768
- page: reference/other-new-features/export.md
6869
- page: reference/other-new-features/opaques.md
6970
- page: reference/other-new-features/opaques-details.md
71+
- page: reference/other-new-features/named-tuples.md
7072
- page: reference/other-new-features/open-classes.md
7173
- page: reference/other-new-features/parameter-untupling.md
7274
- page: reference/other-new-features/parameter-untupling-spec.md
@@ -80,7 +82,9 @@ subsection:
8082
- page: reference/other-new-features/safe-initialization.md
8183
- page: reference/other-new-features/type-test.md
8284
- page: reference/other-new-features/experimental-defs.md
85+
- page: reference/other-new-features/preview-defs.md
8386
- page: reference/other-new-features/binary-literals.md
87+
- page: reference/other-new-features/toplevel-definitions.md
8488
- title: Other Changed Features
8589
directory: changed-features
8690
index: reference/changed-features/changed-features.md
@@ -118,7 +122,6 @@ subsection:
118122
- page: reference/dropped-features/type-projection.md
119123
- page: reference/dropped-features/do-while.md
120124
- page: reference/dropped-features/procedure-syntax.md
121-
- page: reference/dropped-features/package-objects.md
122125
- page: reference/dropped-features/early-initializers.md
123126
- page: reference/dropped-features/class-shadowing.md
124127
- page: reference/dropped-features/class-shadowing-spec.md
@@ -133,6 +136,11 @@ subsection:
133136
- page: reference/dropped-features/nonlocal-returns.md
134137
- page: reference/dropped-features/this-qualifier.md
135138
- page: reference/dropped-features/wildcard-init.md
139+
- title: Preview Features
140+
directory: preview
141+
index: reference/preview/overview.md
142+
subsection:
143+
- page: reference/preview/better-fors.md
136144
- title: Experimental Features
137145
directory: experimental
138146
index: reference/experimental/overview.md
@@ -149,10 +157,17 @@ subsection:
149157
- page: reference/experimental/numeric-literals.md
150158
- page: reference/experimental/explicit-nulls.md
151159
- page: reference/experimental/main-annotation.md
160+
- page: reference/experimental/into.md
152161
- page: reference/experimental/cc.md
153162
- page: reference/experimental/cc-advanced.md
154163
hidden: true
164+
- page: reference/experimental/purefuns.md
155165
- page: reference/experimental/tupled-function.md
166+
- page: reference/experimental/modularity.md
167+
- page: reference/experimental/typeclasses.md
168+
- page: reference/experimental/runtimeChecked.md
169+
- page: reference/experimental/unrolled-defs.md
170+
- page: reference/experimental/package-object-values.md
156171
- page: reference/syntax.md
157172
- title: Language Versions
158173
index: reference/language-versions/language-versions.md

0 commit comments

Comments
 (0)