Skip to content

SEO Optimization #7

@caelinsutch

Description

@caelinsutch

Is your feature request related to a problem? Please describe.
This site has no SEO Optimization

Describe the solution you'd like
Implement a few things.

Server Side Rendering

Dynamically Set Title for different pages

import { Component, OnInit } from '@angular/core';
import { Title, Meta } from '@angular/platform-browser';

//An example of a component setting title and description tags
@Component({
  selector: 'app-about-me',
  template: `
    <p>This page is about me!</p>
  `,
  styleUrls: ['./about-me.component.scss']
})
export class AboutMeComponent implements OnInit {
  constructor(private titleService: Title,
    private metaTagService: Meta) { }

  ngOnInit() {
    this.titleService.setTitle("My App: About me");
    this.metaTagService.updateTag({name: 'description', content: "I'm a developer who writes sometimes."});
    //TODO: Make Other top-level components do this so the above content doesn't get stuck there!
  }
}

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions