add meta data (#5641)

* fix(pages): fix titles and descriptions

* fix(pages): titles and discriptions

* fix(pages): tripple

* fix(pages): fix titles

* feat(app): add og logo
This commit is contained in:
Alex Kurbako 2020-04-04 16:30:03 +03:00 committed by GitHub
parent e4cfcd3123
commit 2a09d3bbb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 112 additions and 30 deletions

View file

@ -4,18 +4,18 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*/
import { Component, OnDestroy } from '@angular/core';
import { Router } from '@angular/router';
import { takeWhile, withLatestFrom, map } from 'rxjs/operators';
import {Component, OnDestroy} from '@angular/core';
import {Router} from '@angular/router';
import {map, takeWhile, withLatestFrom} from 'rxjs/operators';
import {
NbThemeService,
NbMediaBreakpoint,
NbMenuItem,
NbSidebarService,
NbMediaBreakpoint,
} from '@nebular/theme';
NbThemeService} from '@nebular/theme';
import { NgxMenuService } from '../../@theme/services/menu.service';
import { NgxPaginationService } from '../../@theme/services/pagination.service';
import {NgxMenuService} from '../../@theme/services/menu.service';
import {NgxPaginationService} from '../../@theme/services/pagination.service';
import {MetadataService} from '../../../../src/app/@core/utils/metadata.service';
@Component({
selector: 'ngx-landing-docs',
@ -34,7 +34,12 @@ export class LandingDocsComponent implements OnDestroy {
private router: Router,
private themeService: NbThemeService,
private sidebarService: NbSidebarService,
private paginationService: NgxPaginationService) {
private paginationService: NgxPaginationService,
private metadataService: MetadataService) {
this.metadataService.updateDescription('Free and Open Source ngx-admin to bootstrap the development of ' +
'your product or to learn Angular. Over 40+ Angular Components and 60+ Usage Examples.');
this.metadataService.updateTitle('A front-end admin dashboard on Angular 9+, Bootstrap 4+ and Nebular.');
this.themeService.changeTheme('docs-page');
this.paginationService.setPaginationItems('/docs');

View file

@ -6,7 +6,6 @@
import { Component, Inject, NgZone, OnDestroy, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Title } from '@angular/platform-browser';
import {
filter,
map,
@ -21,6 +20,7 @@ import { fromEvent } from 'rxjs';
import { NgxStructureService } from '../../../@theme/services/structure.service';
import { NgxTocStateService } from '../../../@theme/services/toc-state.service';
import {MetadataService} from '../../../../../src/app/@core/utils/metadata.service';
@Component({
selector: 'ngx-admin-landing-page',
@ -38,7 +38,7 @@ export class NgxAdminLandingPageComponent implements OnDestroy, OnInit {
private activatedRoute: ActivatedRoute,
private structureService: NgxStructureService,
private tocState: NgxTocStateService,
private titleService: Title) {
private metaDataService: MetadataService) {
}
get showSettings() {
@ -63,7 +63,8 @@ export class NgxAdminLandingPageComponent implements OnDestroy, OnInit {
}),
filter(item => item),
tap((item: any) => {
this.titleService.setTitle(`Nebular - ${item.name}`);
this.metaDataService.updateTitle(`Nebular - ${item.name}`);
this.metaDataService.updateDescription(item.description);
}),
publishReplay(),
refCount(),