Skip to content

SEO Optimization #7

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!
  }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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