Skip to content

Commit

Permalink
feat(docs): update urls to include baseUrl (#489)
Browse files Browse the repository at this point in the history
  • Loading branch information
nnixaa committed Jun 14, 2018
1 parent 61d4139 commit f7fb11a
Show file tree
Hide file tree
Showing 23 changed files with 69 additions and 66 deletions.
6 changes: 4 additions & 2 deletions docs/app/@theme/services/text.service.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Injectable } from '@angular/core';
import { Location } from '@angular/common';
import * as marked from 'marked';

import { NgdHighlightService } from './highlight.service';
Expand All @@ -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) {
Expand All @@ -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());
}

Expand Down
2 changes: 2 additions & 0 deletions docs/app/documentation/page/page.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
</ng-container>
</ng-container>

<p class="not-found" *ngIf="!currentItem">Page does not exist.</p>

<ngd-pager-block [currentItemSlag]="currentItem?.slag"></ngd-pager-block>
</div>

Expand Down
5 changes: 5 additions & 0 deletions docs/app/documentation/page/page.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions docs/app/documentation/page/page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions docs/articles/auth-guard.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
12 changes: 6 additions & 6 deletions docs/articles/auth-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
<div class="note note-info section-end">
<div class="note-title">Note</div>
<div class="note-body">
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.
</div>
</div>

## 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
Expand Down Expand Up @@ -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.
<hr>

## Enable Auth Components
Expand Down Expand Up @@ -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}';
Expand All @@ -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)
2 changes: 1 addition & 1 deletion docs/articles/auth-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
8 changes: 4 additions & 4 deletions docs/articles/auth-strategy.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`:


Expand All @@ -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

Expand Down Expand Up @@ -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)
4 changes: 2 additions & 2 deletions docs/articles/auth-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion docs/articles/auth-ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion docs/articles/backend-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="https://github.com/angular/angular-cli/blob/master/docs/documentation/stories/proxy.md" target="_blank">their docs</a>.
There's not so much needs to be done to proxy your api using angular-cli. You can read detailed documentation in <a href="https://github.com/angular/angular-cli/blob/masterdocs/documentation/stories/proxy.md" target="_blank">their docs</a>.
But the most important topics are:

You should create `proxy.conf.json` file in your application root. The file should contain something like below:
Expand Down
4 changes: 2 additions & 2 deletions docs/articles/concept-3rd-party.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
10 changes: 5 additions & 5 deletions docs/articles/concept-theme-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
<hr>

## 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';
Expand Down Expand Up @@ -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)
28 changes: 14 additions & 14 deletions docs/articles/concept-ui-kit.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

<div class="note note-info">
<div class="note-title">3rd Party Libraries</div>
Expand Down
8 changes: 4 additions & 4 deletions docs/articles/enabling-theme-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="note note-info">
<div class="note-title">Note</div>
<div class="note-body">
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.
</div>
</div>
<hr>
Expand Down Expand Up @@ -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).
3 changes: 0 additions & 3 deletions docs/articles/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="https://github.com/akveo/ng2-admin/tree/ng2-admin" target="_blank">GitHub branch</a>.

## Have questions?
Didn't find something here? Look through the <a href="https://github.com/akveo/nebular/issues" target="_blank">issues</a> or simply drop us a line at <a href="mailto:contact@akveo.com">contact@akveo.com</a>.
14 changes: 7 additions & 7 deletions docs/articles/install-into-existing.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Add Into Existing Project

If you don't have any code yet, please consider checking <a href="https://cli.angular.io" target="_blank">Angular CLI</a> 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.

<div class="note note-info">
<div class="note-title">ngx-admin custom components</div>
Expand Down Expand Up @@ -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).
<hr>
## Install Styles
Expand All @@ -67,7 +67,7 @@ Include Bootstrap and default Nebular theme CSS files into your `.angular-cli.js
<div class="note-title">Advanced Theme System configuration</div>
<div class="note-body">
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 <a href="#/docs/guides/enable-theme-system">Enabling Theme System</a> article.
or even multiple themes switching - check out [Enabling Theme System](docs/guides/enable-theme-system) article.
</div>
</div>
<hr>
Expand Down Expand Up @@ -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)
5 changes: 2 additions & 3 deletions docs/articles/install-starter-kit.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
<hr>

## 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)
4 changes: 2 additions & 2 deletions docs/articles/security-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="note note-info section-end">
<div class="note-title">Note</div>
<div class="note-body">
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.
</div>
</div>

Expand Down Expand Up @@ -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)
2 changes: 1 addition & 1 deletion docs/articles/security-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion docs/articles/server-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
4 changes: 2 additions & 2 deletions docs/articles/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Nebular is a set of modules for <a href="https://angular.io/" target="_blank">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.

Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit f7fb11a

Please sign in to comment.