From f7fb11a5fd7750b21b734e8ae3231b087abd3f25 Mon Sep 17 00:00:00 2001 From: Dmitry Nehaychik <4dmitr@gmail.com> Date: Thu, 14 Jun 2018 18:56:29 +0300 Subject: [PATCH] feat(docs): update urls to include baseUrl (#489) --- docs/app/@theme/services/text.service.ts | 6 ++-- .../documentation/page/page.component.html | 2 ++ .../documentation/page/page.component.scss | 5 ++++ docs/app/documentation/page/page.component.ts | 3 +- docs/articles/auth-guard.md | 4 +-- docs/articles/auth-install.md | 12 ++++---- docs/articles/auth-intro.md | 2 +- docs/articles/auth-strategy.md | 8 +++--- docs/articles/auth-token.md | 4 +-- docs/articles/auth-ui.md | 2 +- docs/articles/backend-integration.md | 2 +- docs/articles/concept-3rd-party.md | 4 +-- docs/articles/concept-theme-system.md | 10 +++---- docs/articles/concept-ui-kit.md | 28 +++++++++---------- docs/articles/enabling-theme-system.md | 8 +++--- docs/articles/index.md | 3 -- docs/articles/install-into-existing.md | 14 +++++----- docs/articles/install-starter-kit.md | 5 ++-- docs/articles/security-install.md | 4 +-- docs/articles/security-intro.md | 2 +- docs/articles/server-deployment.md | 2 +- docs/articles/start.md | 4 +-- package.json | 1 - 23 files changed, 69 insertions(+), 66 deletions(-) diff --git a/docs/app/@theme/services/text.service.ts b/docs/app/@theme/services/text.service.ts index b3f219b825..bf83dfd34c 100644 --- a/docs/app/@theme/services/text.service.ts +++ b/docs/app/@theme/services/text.service.ts @@ -1,4 +1,5 @@ import { Injectable } from '@angular/core'; +import { Location } from '@angular/common'; import * as marked from 'marked'; import { NgdHighlightService } from './highlight.service'; @@ -10,7 +11,7 @@ export class NgdTextService { private readonly TITLE_MASK = '^#{1,6}[^#]?(.+)\n'; private readonly STRIP_HTML = '<\\/?[^>]+(>|$)'; - constructor(private highlight: NgdHighlightService) { + constructor(private highlight: NgdHighlightService, private location: Location) { } mdToSectionsHTML(markdown: string) { @@ -31,9 +32,10 @@ export class NgdTextService { mdToHTML(markdown: string) { return marked .setOptions({ + baseUrl: this.location.prepareExternalUrl(''), langPrefix: 'hljs ', highlight: (code) => this.highlight.highlight(code), - }) + } as any) .parse(markdown.trim()); } diff --git a/docs/app/documentation/page/page.component.html b/docs/app/documentation/page/page.component.html index 80df01b133..d9e9dff442 100644 --- a/docs/app/documentation/page/page.component.html +++ b/docs/app/documentation/page/page.component.html @@ -19,6 +19,8 @@ +

Page does not exist.

+ diff --git a/docs/app/documentation/page/page.component.scss b/docs/app/documentation/page/page.component.scss index 4dbfa3a924..c01dcf4c6d 100644 --- a/docs/app/documentation/page/page.component.scss +++ b/docs/app/documentation/page/page.component.scss @@ -17,6 +17,11 @@ $table-border: 1px solid #f1f2f3; $table-stripe-bg: #f5f6f7; + .not-found { + color: $heading-light; + font-size: 1.25rem; + } + .middle-column { flex: 3; min-width: 0; diff --git a/docs/app/documentation/page/page.component.ts b/docs/app/documentation/page/page.component.ts index 15d42ed648..231144dd06 100644 --- a/docs/app/documentation/page/page.component.ts +++ b/docs/app/documentation/page/page.component.ts @@ -4,11 +4,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. */ -import { AfterViewInit, Component, Inject, NgZone, OnDestroy, OnInit } from '@angular/core'; +import { Component, Inject, NgZone, OnDestroy, OnInit } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import {Title} from '@angular/platform-browser'; import { - distinctUntilChanged, filter, map, publishBehavior, diff --git a/docs/articles/auth-guard.md b/docs/articles/auth-guard.md index 37eae676b2..e548f32b53 100644 --- a/docs/articles/auth-guard.md +++ b/docs/articles/auth-guard.md @@ -132,5 +132,5 @@ Easy as that! Hope you found it useful. ## Related Articles -- [NbAuthService](#/docs/auth/nbauthservice) -- [NbTokenService](#/docs/auth/nbtokenservice) +- [NbAuthService](docs/auth/nbauthservice) +- [NbTokenService](docs/auth/nbtokenservice) diff --git a/docs/articles/auth-install.md b/docs/articles/auth-install.md index c9822bca8f..d957eb109e 100644 --- a/docs/articles/auth-install.md +++ b/docs/articles/auth-install.md @@ -3,13 +3,13 @@
Note
- If you use our [ngx-admin starter kit](#/docs/guides/install-based-on-starter-kit) then you already have the Auth module in place. + If you use our [ngx-admin starter kit](docs/guides/install-based-on-starter-kit) then you already have the Auth module in place.
## Install the module -First, let's install the module as it's distributed as an npm package, but make sure you have the [Nebular Theme module up and running](https://akveo.github.io/nebular/#/docs/installation/add-into-existing-project). +First, let's install the module as it's distributed as an npm package, but make sure you have the [Nebular Theme module up and running](https://akveo.github.io/nebulardocs/installation/add-into-existing-project). Nebular Theme is required to use built-in Auth Components. If you are not going to use those at all, you can use `Auth Module` without the `Nebular Theme` module. ```bash @@ -51,7 +51,7 @@ To add a strategy we need to call static `setup` method to pass a list of option ``` We also specified a `forms` key, which configures available options for the Auth Components. -We leave it empty for now and get back to it in the [Configuring UI](#/docs/auth/configuring-ui) article. +We leave it empty for now and get back to it in the [Configuring UI](docs/auth/configuring-ui) article.
## Enable Auth Components @@ -109,7 +109,7 @@ export const routes: Routes = [ ## Enable Styles -Last but not least - install the component styles into your themes.scss ([more details](/#/docs/guides/enable-theme-system)): +Last but not least - install the component styles into your themes.scss ([more details](docs/guides/enable-theme-system)): ```scss @import '~@nebular/auth/styles/all'; // or @import '~@nebular/auth/styles/{theme-name}'; @@ -129,5 +129,5 @@ At this point, if you navigate to http://localhost:4200/#/auth/login the login f ## Related Articles -- [Configuring a Strategy](#/docs/auth/configuring-a-strategy) -- Adjusting [Auth Components UI](#/docs/auth/configuring-ui) +- [Configuring a Strategy](docs/auth/configuring-a-strategy) +- Adjusting [Auth Components UI](docs/auth/configuring-ui) diff --git a/docs/articles/auth-intro.md b/docs/articles/auth-intro.md index 7b29a13da8..e4963db5b3 100644 --- a/docs/articles/auth-intro.md +++ b/docs/articles/auth-intro.md @@ -36,4 +36,4 @@ You can use the built-in components or create your custom ones. ## Related Articles -- Auth Module [Installation](#/docs/auth/installation) +- Auth Module [Installation](docs/auth/installation) diff --git a/docs/articles/auth-strategy.md b/docs/articles/auth-strategy.md index 7056d76dd1..e70b9c09ff 100644 --- a/docs/articles/auth-strategy.md +++ b/docs/articles/auth-strategy.md @@ -12,7 +12,7 @@ Each Strategy has a list of configurations available with the default values set ## Configure a strategy -As an example, let's configure API endpoints for the `NbPasswordAuthStrategy`. The strategy is configured by default, please take a look at the [default configuration values](#/docs/auth/NbPasswordAuthStrategy) if you need any custom behaviour. +As an example, let's configure API endpoints for the `NbPasswordAuthStrategy`. The strategy is configured by default, please take a look at the [default configuration values](docs/auth/NbPasswordAuthStrategy) if you need any custom behaviour. We assume you already have the Auth module installed inside of your `*.module.ts`: @@ -39,7 +39,7 @@ We assume you already have the Auth module installed inside of your `*.module.ts ## Setup API configuration -Now, let's add API endpoints. According to the [NbPasswordAuthStrategy documentation](#/docs/auth/NbPasswordAuthStrategy), we have `baseEndpoint` setting, and also an `endpoint` setting for each function (login/register/etc): +Now, let's add API endpoints. According to the [NbPasswordAuthStrategy documentation](docs/auth/NbPasswordAuthStrategy), we have `baseEndpoint` setting, and also an `endpoint` setting for each function (login/register/etc): ```typescript @@ -142,5 +142,5 @@ Great! With these simple steps, you should have the authentication layer correct ## Related Articles -- Adjusting [Auth Components UI](#/docs/auth/configuring-ui) -- Receiving [user token after authentication](#/docs/auth/getting-user-token) +- Adjusting [Auth Components UI](docs/auth/configuring-ui) +- Receiving [user token after authentication](docs/auth/getting-user-token) diff --git a/docs/articles/auth-token.md b/docs/articles/auth-token.md index 17bf601d66..ea38d0995f 100644 --- a/docs/articles/auth-token.md +++ b/docs/articles/auth-token.md @@ -157,5 +157,5 @@ And done! Relatively you can inject `NbAuthService` in the other components to m ## Related Articles -- [NbAuthService](#/docs/auth/nbauthservice) -- [NbTokenService](#/docs/auth/nbtokenservice) +- [NbAuthService](docs/auth/nbauthservice) +- [NbTokenService](docs/auth/nbtokenservice) diff --git a/docs/articles/auth-ui.md b/docs/articles/auth-ui.md index 311a1c6a36..4bd5b180c2 100644 --- a/docs/articles/auth-ui.md +++ b/docs/articles/auth-ui.md @@ -315,4 +315,4 @@ That's it. Now you can adjust the components the way you need. Though please mak ## Where to next -- Receiving [user token after authentication](#/docs/auth/getting-user-token) +- Receiving [user token after authentication](docs/auth/getting-user-token) diff --git a/docs/articles/backend-integration.md b/docs/articles/backend-integration.md index 35bbbfad41..5b96659a20 100644 --- a/docs/articles/backend-integration.md +++ b/docs/articles/backend-integration.md @@ -12,7 +12,7 @@ The solution we suggest is to use proxy for your API server. In this case you ca ## angular-cli/webpack-dev-server setup -There's not so much needs to be done to proxy your api using angular-cli. You can read detailed documentation in their docs. +There's not so much needs to be done to proxy your api using angular-cli. You can read detailed documentation in their docs. But the most important topics are: You should create `proxy.conf.json` file in your application root. The file should contain something like below: diff --git a/docs/articles/concept-3rd-party.md b/docs/articles/concept-3rd-party.md index e5ede07c58..e7d3638edb 100644 --- a/docs/articles/concept-3rd-party.md +++ b/docs/articles/concept-3rd-party.md @@ -33,5 +33,5 @@ Or that's how we described variables for the `angular2-toaster` module: ## Related Articles -- [Enable Theme System](#/docs/guides/enable-theme-system) -- [Theme System Concepts](#/docs/guides/theme-system) +- [Enable Theme System](docs/guides/enable-theme-system) +- [Theme System Concepts](docs/guides/theme-system) diff --git a/docs/articles/concept-theme-system.md b/docs/articles/concept-theme-system.md index 551f6abf0d..c7323d5614 100644 --- a/docs/articles/concept-theme-system.md +++ b/docs/articles/concept-theme-system.md @@ -71,12 +71,12 @@ As you can see, you have 8 variables for a pretty simple component and from the That means that if you want to create a new theme with a united look & feel of the components - in most cased you would need to change around 10 generic variables, such as `color-bg`, `shadow`, etc to change the UI completely. -List of component style variables is specified in the component documentation, for example [styles for header component](#/docs/components/layout/theme#nblayoutheadercomponent). +List of component style variables is specified in the component documentation, for example [styles for header component](docs/components/layout/theme#nblayoutheadercomponent).
## Variables Usage -Now, if you want to use the variables in your custom style files, all you need to do (of course, after the [successful setup of the Theme System](#/docs/guides/enabling-theme-system) is call `nb-theme(var-name)` function: +Now, if you want to use the variables in your custom style files, all you need to do (of course, after the [successful setup of the Theme System](docs/guides/enabling-theme-system) is call `nb-theme(var-name)` function: ```scss @import '../../../@theme/styles/themes'; @@ -120,6 +120,6 @@ The only requirement for the feature to work is to wrap all of your component st ## Related Articles -- [Enable Theme System](#/docs/guides/enable-theme-system) -- [Default Theme variables table](#/docs/themes/default) -- [Cosmic Theme variables table](#/docs/themes/cosmic) +- [Enable Theme System](docs/guides/enable-theme-system) +- [Default Theme variables table](docs/themes/default) +- [Cosmic Theme variables table](docs/themes/cosmic) diff --git a/docs/articles/concept-ui-kit.md b/docs/articles/concept-ui-kit.md index f8c6a9eb42..f6adf6a016 100644 --- a/docs/articles/concept-ui-kit.md +++ b/docs/articles/concept-ui-kit.md @@ -4,20 +4,20 @@ Nebular Components is a list of pure Angular components allowing you to quickly Here's a list of Nebular components: -- [Layout](#/docs/components/layout) including header and footer -- [Sidebar](#/docs/components/sidebar) -- [Menu](#/docs/components/menu) -- [Card](#/docs/components/card) -- [Flip Card](#/docs/components/flip-card) -- [Reveal Card](#/docs/components/reveal-card) -- [Search](#/docs/components/search) -- [Tabs](#/docs/components/tabs) -- [Actions](#/docs/components/actions) -- [User(Avatar)](#/docs/components/user-avatar) -- [Checkbox](#/docs/components/checkbox) -- [Badge](#/docs/components/badge) -- [Popover](#/docs/components/popover) -- [Context Menu](#/docs/components/context-menu) +- [Layout](docs/components/layout) including header and footer +- [Sidebar](docs/components/sidebar) +- [Menu](docs/components/menu) +- [Card](docs/components/card) +- [Flip Card](docs/components/flip-card) +- [Reveal Card](docs/components/reveal-card) +- [Search](docs/components/search) +- [Tabs](docs/components/tabs) +- [Actions](docs/components/actions) +- [User(Avatar)](docs/components/user-avatar) +- [Checkbox](docs/components/checkbox) +- [Badge](docs/components/badge) +- [Popover](docs/components/popover) +- [Context Menu](docs/components/context-menu)
3rd Party Libraries
diff --git a/docs/articles/enabling-theme-system.md b/docs/articles/enabling-theme-system.md index 109b6cac36..a53e733ca6 100644 --- a/docs/articles/enabling-theme-system.md +++ b/docs/articles/enabling-theme-system.md @@ -3,7 +3,7 @@
Note
- If you use our [ngx-admin starter kit](#/docs/guides/install-based-on-starter-kit) then you already have the Advanced setup in place. + If you use our [ngx-admin starter kit](docs/guides/install-based-on-starter-kit) then you already have the Advanced setup in place.

@@ -188,6 +188,6 @@ enableDarkTheme() { ## Related Articles -- [Theme System Concepts](#/docs/guides/theme-system). -- [Default Theme variables table](#/docs/themes/default). -- [Cosmic Theme variables table](#/docs/themes/cosmic). +- [Theme System Concepts](docs/guides/theme-system). +- [Default Theme variables table](docs/themes/default). +- [Cosmic Theme variables table](docs/themes/cosmic). diff --git a/docs/articles/index.md b/docs/articles/index.md index 07d017ed02..906ca46cb7 100644 --- a/docs/articles/index.md +++ b/docs/articles/index.md @@ -49,8 +49,5 @@ That's why we are on a mission to assemble together the most useful modules and This documentation assumes that you are already familiar with JavaScript/TypeScript, Angular, CSS and Bootstrap. -## Looking for ng2-admin? -It's not gone and still supported! The ng2-admin is still available at GitHub branch. - ## Have questions? Didn't find something here? Look through the issues or simply drop us a line at contact@akveo.com. diff --git a/docs/articles/install-into-existing.md b/docs/articles/install-into-existing.md index 7a3ec0a7e5..8c59f5ab5b 100644 --- a/docs/articles/install-into-existing.md +++ b/docs/articles/install-into-existing.md @@ -1,7 +1,7 @@ # Add Into Existing Project If you don't have any code yet, please consider checking Angular CLI documentation for help creating your app. -In case you want to start based on our ngx-admin starter kit, please check out [Based on Starter Kit (ngx-admin)](#/docs/guides/install-based-on-starter-kit) article. +In case you want to start based on our ngx-admin starter kit, please check out [Based on Starter Kit (ngx-admin)](docs/guides/install-based-on-starter-kit) article.
ngx-admin custom components
@@ -48,7 +48,7 @@ import { NbThemeModule } from '@nebular/theme'; export class AppModule { ``` -Same way you can enable Auth Module (more details under [Auth Module Concepts & Install](#/docs/auth/conceptsinstall) article). +Same way you can enable Auth Module (more details under [Auth Module Concepts & Install](docs/auth/conceptsinstall) article).
## Install Styles @@ -67,7 +67,7 @@ Include Bootstrap and default Nebular theme CSS files into your `.angular-cli.js
Advanced Theme System configuration
In this article we describe the very basic styles installation. If you need more advanced features, like theme variables management, - or even multiple themes switching - check out Enabling Theme System article. + or even multiple themes switching - check out [Enabling Theme System](docs/guides/enable-theme-system) article.

@@ -133,7 +133,7 @@ And done! At this step, you should have a page with a simple layout on it lookin ## Related Articles -- [Advanced Theme System configuration](#/docs/guides/enable-theme-system) -- [Nebular UI Kit](#/docs/guides/components-overview#advanced-setup) -- [NbLayout, NbLayoutColumn, NbLayoutHeader, NbLayoutFooter](#/docs/components/layout) -- [Deploying to production server](#/docs/guides/server-deployment) +- [Advanced Theme System configuration](docs/guides/enable-theme-system) +- [Nebular UI Kit](docs/guides/components-overview#advanced-setup) +- [NbLayout, NbLayoutColumn, NbLayoutHeader, NbLayoutFooter](docs/components/layout) +- [Deploying to production server](docs/guides/server-deployment) diff --git a/docs/articles/install-starter-kit.md b/docs/articles/install-starter-kit.md index fbf8bbf5d8..430d5548f7 100644 --- a/docs/articles/install-starter-kit.md +++ b/docs/articles/install-starter-kit.md @@ -61,10 +61,9 @@ npm run build:prod ``` This will clear up your `dist` folder (where release files are located) and generate a release build. -Now you can copy the sources from the `dist` folder and use it with any backend framework or simply [put it under a web server](#/docs/guides/server-deployment). +Now you can copy the sources from the `dist` folder and use it with any backend framework or simply [put it under a web server](docs/guides/server-deployment).
## Related Articles -- [Deploying to production server](#/docs/guides/server-deployment) -- [Updating ngx-admin to the latest verion](#/docs/guides/ngx-admin-update) +- [Deploying to production server](docs/guides/server-deployment) diff --git a/docs/articles/security-install.md b/docs/articles/security-install.md index 024b4f2525..ad583101ad 100644 --- a/docs/articles/security-install.md +++ b/docs/articles/security-install.md @@ -3,7 +3,7 @@
Note
- If you use our [ngx-admin starter kit](#/docs/guides/install-based-on-starter-kit) then you already have Security module in place. + If you use our [ngx-admin starter kit](docs/guides/install-based-on-starter-kit) then you already have Security module in place.
@@ -38,4 +38,4 @@ Great, at this stage we have installed Nebular Security and ready to configure i ## Related Articles -- Roles & Permissions [Configuration & Usage](#/docs/security/acl-configuration--usage) +- Roles & Permissions [Configuration & Usage](docs/security/acl-configuration--usage) diff --git a/docs/articles/security-intro.md b/docs/articles/security-intro.md index 5ac59c4f8a..0a7a2261d6 100644 --- a/docs/articles/security-intro.md +++ b/docs/articles/security-intro.md @@ -26,4 +26,4 @@ Unlike the `Nebular Auth`, which provides a way to `authenticate` a user, `Nebul ## Related Articles -- Security Module [Installation](#/docs/security/installation) +- Security Module [Installation](docs/security/installation) diff --git a/docs/articles/server-deployment.md b/docs/articles/server-deployment.md index b113795899..0c43e6dd0d 100644 --- a/docs/articles/server-deployment.md +++ b/docs/articles/server-deployment.md @@ -12,4 +12,4 @@ More details on how to setup your web-server to better serve the application can ## Related Articles -- [Backend configuration](#/docs/guides/backend-integration) +- [Backend configuration](docs/guides/backend-integration) diff --git a/docs/articles/start.md b/docs/articles/start.md index bc9fe3e949..a65f29f8b7 100644 --- a/docs/articles/start.md +++ b/docs/articles/start.md @@ -7,8 +7,8 @@ Nebular is a set of modules for An Based on a current setup of your project and your goals, there are two starting points: -- **[Starting based on our Nebular Admin starter kit](#/docs/guides/install-based-on-starter-kit)** Consider this tutorial if you are building admin or any other back-office application and you need a template as a good starting kit. -- **[Adding into existing Angular Project](#/docs/guides/add-into-existing-project)** This tutorial explains how to use Nebular if you already have some Angular code as starting app from scratch. +- **[Starting based on our Nebular Admin starter kit](docs/guides/install-based-on-starter-kit)** Consider this tutorial if you are building admin or any other back-office application and you need a template as a good starting kit. +- **[Adding into existing Angular Project](docs/guides/add-into-existing-project)** This tutorial explains how to use Nebular if you already have some Angular code as starting app from scratch. Please consider creating an issue on GitHub if your use case is not described above. But we kindly ask to always look through the documentation and the list of existing issues first. diff --git a/package.json b/package.json index 54fc66ad18..7d2a18f784 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,6 @@ "build": "ng build", "build:prod": "npm run build -- --prod --aot", "build:wp": "npm run build:prod -- playground-wp", - "build:ghpages": "npm run build:prod -- --base-href \"https://akveo.github.io/nebular/\" && ngh", "build:package": "npm-run-all -s clean:tmp:lib gulp build:ts build:inline-resources build:bundle clean:tmp", "build:ts": "tsc -p tsconfig.publish.json && ngc -p tsconfig.publish.json", "build:inline-resources": "gulp inline-resources",