Skip to content

Commit

Permalink
Merge pull request NativeScript#1227 from NativeScript/niliev/readme
Browse files Browse the repository at this point in the history
fix broken links in README + redirects
  • Loading branch information
etabakov authored Jun 28, 2018
2 parents dc25564 + 2699fee commit 5758fac
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ This documentation is built using [Jekyll](https://jekyllrb.com/docs/home/). Mor

## Configuration

There are two versions of the NativeScript documentation that generate similar output: `nativescript` and `angular`. The former builds the vanilla NativeScript docs at [docs.nativescript.org](https://docs.nativescript.org/), while the latter discusses Angular-specific topics at [docs.nativescript.org/angular](https://docs.nativescript.org/angular).
There are two versions of the NativeScript documentation that generate similar output: `nativescript` and `angular`. The former builds the vanilla NativeScript docs at [docs.nativescript.org](https://docs.nativescript.org/), while the latter discusses Angular-specific topics at [docs.nativescript.org/angular/start/introduction](https://docs.nativescript.org/angular/start/introduction).


Most of the content in this repository is shared between the two environments, but occasionally you may need to add environment-specific content. When you have this need you have a few options.

Expand All @@ -40,7 +41,7 @@ This paragraph appears in both environments.

## Tutorials

The NativeScript documentation contains two full getting started tutorials, one for [using NativeScript with vanilla JavaScript](https://docs.nativescript.org/tutorial/chapter-0), and another for [using NativeScript with Angular](https://docs.nativescript.org/angular/tutorial/ng-chapter-0.html). The contents of these two tutorials are in [this repository’s `/tutorial` folder](https://github.com/NativeScript/docs/tree/master/tutorial).
The NativeScript documentation contains two full getting started tutorials, one for [using NativeScript with vanilla JavaScript](https://docs.nativescript.org/start/tutorial/chapter-1), and another for [using NativeScript with Angular](https://docs.nativescript.org/angular/start/tutorial/ng-chapter-1). The contents of these two tutorials are in [this repository’s `/tutorial` folder](https://github.com/NativeScript/sample-Groceries).

When making changes to either of these tutorials you might need to additional alter one of the four templates these tutorials use. Readers use these templates through the `tns create` command, for example `tns create HelloWorld --template nativescript-template-tutorial`.

Expand Down
10 changes: 8 additions & 2 deletions build/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,14 @@ http {
rewrite ^/publishing/publishing-android-apps $proto://$host_and_port/tooling/publishing/publishing-android-apps permanent;
rewrite ^/publishing/publishing-ios-apps $proto://$host_and_port/tooling/publishing/publishing-ios-apps permanent;

# Redirect base Angular link
rewrite ^/angular $proto://$host_and_port/angular/start/introduction permanent;

# Redirect Angular Code Samples to UI Widgets
rewrite ^/angular/code-samples/ui/(.*) $proto://$host_and_port/angular/ui/ng-ui-widgets/$1 permanent;
rewrite ^/angular/code-samples/ui/layouts $proto://$host_and_port/angular/ui/layouts/layout-containers permanent;

# Redirect Angular code-samples (taht were outside UI section)
# Redirect Angular code-samples (that were outside UI section)
rewrite ^/angular/cookbook/application $proto://$host_and_port/angular/ng-framework-modules/application permanent;
rewrite ^/angular/cookbook/application-settings $proto://$host_and_port/angular/ng-framework-modules/application-settings permanent;
rewrite ^/angular/cookbook/color $proto://$host_and_port/angular/ng-framework-modules/color permanent;
Expand Down Expand Up @@ -141,7 +144,7 @@ http {
rewrite ^/angular/best-practices/bundling-with-webpack $proto://$host_and_port/angular/performance-optimizations/bundling-with-webpack permanent;
rewrite ^/best-practices/images-optimisations $proto://$host_and_port/angular/performance-optimizations/images-optimisations permanent;

# Redirect the Angular Cookbook tutorial to proper "Get Started" subsections
# Redirect the Angular Groceries tutorial to proper "Get Started" subsections
rewrite ^/angular/tutorial/ng-chapter-0 $proto://$host_and_port/angular/start/quick-setup permanent;
rewrite ^/angular/tutorial/ng-chapter-1 $proto://$host_and_port/angular/start/hello-world/ng-chapter-1 permanent;
rewrite ^/angular/tutorial/ng-chapter-2 $proto://$host_and_port/angular/start/hello-world/ng-chapter-2 permanent;
Expand All @@ -151,6 +154,9 @@ http {
rewrite ^/angular/tutorial/ng-chapter-6 $proto://$host_and_port/angular/start/tutorial/ng-chapter-5 permanent;
rewrite ^/angular/tutorial/ng-chapter-7 $proto://$host_and_port/angular/start/ng-next-steps permanent;

# Redirect the JavaScript Groceris tutorial links
rewrite ^/tutorial/chapter-0 $proto://$host_and_port/start/hello-world/chapter-0 permanent;

# Redirect .html extension
rewrite ^/(.*)\.html$ $proto://$host_and_port/$1 redirect;

Expand Down

0 comments on commit 5758fac

Please sign in to comment.