This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var path = require('path'); | |
var fs = require('fs'); | |
const rendertron = require('rendertron-middleware'); | |
var app = express(); | |
const bots = [ | |
'baiduspider', | |
'bingbot', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var path = require('path'); | |
var favicon = require('serve-favicon'); | |
var logger = require('morgan'); | |
var bodyParser = require('body-parser'); | |
var http = require('http'); | |
const fetch = require('node-fetch'); | |
const url = require('url'); | |
const rendertron = require('rendertron-middleware'); | |
var app = express(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var path = require('path'); | |
var favicon = require('serve-favicon'); | |
var logger = require('morgan'); | |
var bodyParser = require('body-parser'); | |
var http = require('http'); | |
const fetch = require('node-fetch'); | |
const url = require('url'); | |
const rendertron = require('rendertron-middleware'); | |
var app = express(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
/** | |
* Module dependencies. | |
*/ | |
var app = require('../app'); | |
var debug = require('debug')('mean-app:server'); | |
var http = require('http'); | |
/* | |
* Get port from environment and store in Express. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
import { SeoService } from '../seo.service'; | |
@Component({ | |
selector: 'about-page', | |
templateUrl: './about-page.component.html', | |
styleUrls: ['./about-page.component.sass'], | |
}) | |
export class AboutPageComponent implements OnInit { | |
constructor(private seo: SeoService) { } | |
ngOnInit() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from '@angular/core'; | |
import { Meta } from '@angular/platform-browser'; | |
@Injectable() | |
export class SeoService { | |
constructor(private meta: Meta) { } | |
generateTags(config) { | |
// default values | |
config = { | |
title: 'Angular <3 Linkbots', | |
description: 'My SEO friendly Angular Component', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta name="description" content="An angular app that is actually search crawler bot friendly"> | |
<meta name="keywords" content="summary"> | |
<!-- twitter --> | |
<meta name="twitter:card" content="summary"> | |
<meta name="twitter:site" content="@content"> | |
<meta name="twitter:title" content="Home page"> | |
<meta name="twitter:description" content="An angular app that is actually search crawler bot friendly"> | |
<meta name="twitter:image" content="https://www.example.com/assets/seo.jpeg"> | |
<!-- facebook and other social sites --> |