Skip to content

Commit

Permalink
docs(versioning): add versioning to docs website
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan-Niklas Wortmann committed Oct 3, 2020
1 parent f23a2a8 commit 21051db
Show file tree
Hide file tree
Showing 5 changed files with 136 additions and 124 deletions.
11 changes: 11 additions & 0 deletions docs_app/.firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"targets": {
"rxjs-dev": {
"hosting": {
"next": [
"next-rxjs"
]
}
}
}
}
230 changes: 119 additions & 111 deletions docs_app/content/navigation.json
Original file line number Diff line number Diff line change
@@ -1,112 +1,120 @@
{
"TopBar": [
{
"url": "guide/overview",
"title": "Overview"
},
{
"url": "api",
"title": "Reference"
},
{
"url": "guide/v6/migration",
"title": "Migration"
},
{
"url": "team",
"title": "Team"
}
],
"TopBarNarrow": [],
"SideNav": [
{
"url": "guide/overview",
"title": "Overview",
"tooltip": "RxJS Overview",
"children": [
{
"url": "guide/observable",
"title": "Observables"
},
{
"url": "guide/observer",
"title": "Observer"
},
{
"url": "guide/operators",
"title": "Operators"
},
{
"url": "guide/subscription",
"title": "Subscription"
},
{
"url": "guide/subject",
"title": "Subjects"
},
{
"url": "guide/scheduler",
"title": "Scheduler"
},
{
"url": "guide/testing/marble-testing",
"title": "Marble Testing"
}
]
},
{
"url": "guide/installation",
"title": "Installation",
"tooltip": "Installation"
},
{
"url": "api",
"title": "Reference",
"tooltip": "RxJS Reference"
},
{
"url": "guide/glossary-and-semantics",
"title": "Glossary",
"tooltip": "Glossary and Semantics"
},
{
"tooltip": "Operator Decision Tree",
"url": "operator-decision-tree",
"title": "Operator Decision Tree"
},
{
"title": "About Version 6",
"children": [
{
"url": "guide/v6/migration",
"title": "Migration"
},
{
"url": "guide/v6/pipeable-operators",
"title": "Pipeable Operators"
}
]
},
{
"title": "Deprecations & Breaking Changes",
"children": [
{
"url": "deprecations/scheduler-argument",
"title": "Scheduler Argument"
}

]
},
{
"url": "resources",
"title": "External Resources",
"tooltip": "External Resources"
},
{
"url": "code-of-conduct",
"title": "Code of Conduct",
"tooltip": "Code of Conduct"
}
],
"docVersions": []
}
"TopBar": [
{
"url": "guide/overview",
"title": "Overview"
},
{
"url": "api",
"title": "Reference"
},
{
"url": "guide/v6/migration",
"title": "Migration"
},
{
"url": "team",
"title": "Team"
}
],
"TopBarNarrow": [],
"SideNav": [
{
"url": "guide/overview",
"title": "Overview",
"tooltip": "RxJS Overview",
"children": [
{
"url": "guide/observable",
"title": "Observables"
},
{
"url": "guide/observer",
"title": "Observer"
},
{
"url": "guide/operators",
"title": "Operators"
},
{
"url": "guide/subscription",
"title": "Subscription"
},
{
"url": "guide/subject",
"title": "Subjects"
},
{
"url": "guide/scheduler",
"title": "Scheduler"
},
{
"url": "guide/testing/marble-testing",
"title": "Marble Testing"
}
]
},
{
"url": "guide/installation",
"title": "Installation",
"tooltip": "Installation"
},
{
"url": "api",
"title": "Reference",
"tooltip": "RxJS Reference"
},
{
"url": "guide/glossary-and-semantics",
"title": "Glossary",
"tooltip": "Glossary and Semantics"
},
{
"tooltip": "Operator Decision Tree",
"url": "operator-decision-tree",
"title": "Operator Decision Tree"
},
{
"title": "About Version 6",
"children": [
{
"url": "guide/v6/migration",
"title": "Migration"
},
{
"url": "guide/v6/pipeable-operators",
"title": "Pipeable Operators"
}
]
},
{
"title": "Deprecations & Breaking Changes",
"children": [
{
"url": "deprecations/scheduler-argument",
"title": "Scheduler Argument"
}
]
},
{
"url": "resources",
"title": "External Resources",
"tooltip": "External Resources"
},
{
"url": "code-of-conduct",
"title": "Code of Conduct",
"tooltip": "Code of Conduct"
}
],
"docVersions": [
{
"title": "v7",
"url": "https://next-rxjs.web.app/"
},
{
"title": "v6",
"url": "https://rxjs.dev/"
}
]
}
5 changes: 3 additions & 2 deletions docs_app/firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
},
"hosting": {
"public": "dist",
"target": "next",
"cleanUrls": true,
"redirects": [
//////////////////////////////////////////////////////////////////////////////////////////////
Expand All @@ -14,8 +15,8 @@

// Strip off the `.html` extension, because Firebase will not do this automatically any more
// (unless the new URL points to an existing file, which is not necessarily the case here).
{"type": 301, "source": "/:somePath*/:file.html", "destination": "/:somePath*/:file"},
{"type": 301, "source": "/:topLevelFile.html", "destination": "/:topLevelFile"}
{ "type": 301, "source": "/:somePath*/:file.html", "destination": "/:somePath*/:file" },
{ "type": 301, "source": "/:topLevelFile.html", "destination": "/:topLevelFile" }
],
"rewrites": [
{
Expand Down
4 changes: 2 additions & 2 deletions docs_app/src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
<aio-nav-menu *ngIf="!isSideBySide" [nodes]="topMenuNarrowNodes" [currentNode]="currentNodes?.TopBarNarrow" [isWide]="false"></aio-nav-menu>
<aio-nav-menu [nodes]="sideNavNodes" [currentNode]="currentNodes?.SideNav" [isWide]="isSideBySide"></aio-nav-menu>

<!-- <div class="doc-version">
<div class="doc-version">
<aio-select (change)="onDocVersionChange($event.index)" [options]="docVersions" [selected]="currentDocVersion"></aio-select>
</div> -->
</div>
</mat-sidenav>

<section class="sidenav-content" [id]="pageId" role="main">
Expand Down
10 changes: 1 addition & 9 deletions docs_app/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,7 @@ export class AppComponent implements OnInit {
this.navigationService.versionInfo,
this.navigationService.navigationViews.pipe(map(views => views['docVersions']))
).subscribe(([versionInfo, versions]) => {
// TODO(pbd): consider whether we can lookup the stable and next versions from the internet
const computedVersions: NavigationNode[] = [
{ title: 'next', url: 'https://next.angular.io' },
{ title: 'stable', url: 'https://angular.io' },
];
if (this.deployment.mode === 'archive') {
computedVersions.push({ title: `v${versionInfo.major}` });
}
this.docVersions = [...computedVersions, ...versions];
this.docVersions = [...versions];

// Find the current version - eithers title matches the current deployment mode
// or its title matches the major version of the current version info
Expand Down

0 comments on commit 21051db

Please sign in to comment.