angular and seo - greenlane all hands day 10/17/16

27
Angular and SEO we.in(kansas)==!anymore

Upload: sean-malseed

Post on 14-Feb-2017

50 views

Category:

Data & Analytics


1 download

TRANSCRIPT

Page 1: Angular and SEO - Greenlane All Hands Day 10/17/16

Angular and SEOwe.in(kansas)==!anymore

Page 2: Angular and SEO - Greenlane All Hands Day 10/17/16

misconceptioninception

Page 3: Angular and SEO - Greenlane All Hands Day 10/17/16

What We’re Covering• wtf is a website, anyway?• javascript primer• how {{ angular }} sites are {{ built }}• angular + seo• don’t fight the future• resources

Page 4: Angular and SEO - Greenlane All Hands Day 10/17/16

wtf is a website, anyway?ain’t your gramma’s content consumption anymore

4

Page 5: Angular and SEO - Greenlane All Hands Day 10/17/16

From text content...The first websites were just a way of making linked text documents available.

The first true website ever is still online:

http://info.cern.ch/hypertext/WWW/TheProject.html 5

Page 6: Angular and SEO - Greenlane All Hands Day 10/17/16

6

Page 7: Angular and SEO - Greenlane All Hands Day 10/17/16

… to dynamic applicationsWebsites today do way more than serve up text or digital magazine pages.

Modern websites are full-fledged applications.

7

Page 8: Angular and SEO - Greenlane All Hands Day 10/17/16

8

Page 9: Angular and SEO - Greenlane All Hands Day 10/17/16

javascript primeralert(“don’t be alarmed”);

9

Page 10: Angular and SEO - Greenlane All Hands Day 10/17/16

Javascript - web programmingHTML is a markup language - tells a browser how to layout and style a document.

Javscript is a scripting programming language - basically adding features to the browser.

10

Page 11: Angular and SEO - Greenlane All Hands Day 10/17/16

HTML example<body><h1>Heading</h1><br /><strong>Hello there.</strong></body>

11

Page 12: Angular and SEO - Greenlane All Hands Day 10/17/16

Javascript example<script>

document.addEventListener( 'DOMContentLoaded', function ()

{

document.write('hello there');

}, false );

</script>

12

Page 13: Angular and SEO - Greenlane All Hands Day 10/17/16

how angular sites are {{ built }}

more app than site

13

Page 14: Angular and SEO - Greenlane All Hands Day 10/17/16

Template + controllerThe two basic components of an Angular app are:Template - builds the page layoutController - connects functions to the template

14

Page 15: Angular and SEO - Greenlane All Hands Day 10/17/16

The templateThe two basic components of an Angular app are:Template - builds the page layoutController - connects functions to the template

15

Page 16: Angular and SEO - Greenlane All Hands Day 10/17/16

16

<superfunnypanel title="Personal Data"

edit="/employee/{{employee.id}}/edit">

<!-- actual content comes here -->

</superfunnypanel>

module.directive('superfunnypanel', function () { return

{restrict:’E’, //some fancy code whatever you get it

right

Controller:

Template:

Page 17: Angular and SEO - Greenlane All Hands Day 10/17/16

angular + seobest of both worlds (ish)

17

Page 18: Angular and SEO - Greenlane All Hands Day 10/17/16

1. Google can crawl it.

18

https://www.screamingfrog.co.uk/seo-spider-6-0/

Page 19: Angular and SEO - Greenlane All Hands Day 10/17/16

2. You gotta crawl like Google.

19

https://webmasters.googleblog.com/2014/05/understanding-web-pages-better.html

Page 20: Angular and SEO - Greenlane All Hands Day 10/17/16

3. Pushstate

20

http://www.codelord.net/2015/05/12/angularjs-how-to-setup-pushstate-with-html5mode/

Page 21: Angular and SEO - Greenlane All Hands Day 10/17/16

4. Don’t view-source, inspect.

21

Page 22: Angular and SEO - Greenlane All Hands Day 10/17/16

5. Don’t contradict

tags.22

Page 23: Angular and SEO - Greenlane All Hands Day 10/17/16

6. AJAX

23

Asynchronous JavaScript and XML

Infinite Suggest AJAX https://script.google.com/macros/s/AKfycbxLiwwsGKnNbEp9YBmytHlgS6u8i7HNZXGb_Z_MJFWoocHubDnV/exec?k=skate%20board&l=en&loc=google.com&limit=10&offset=0&callback=JSON_CALLBACK

Google internal AJAX https://www.google.com/complete/search?client=serp&hl=en&gs_ri=serp&q=rank%20tank%20

Page 24: Angular and SEO - Greenlane All Hands Day 10/17/16

7. AJAX timeout

24

Page 25: Angular and SEO - Greenlane All Hands Day 10/17/16

don’t fight the futurepeople thought inline images were dumb once

25

Page 26: Angular and SEO - Greenlane All Hands Day 10/17/16

resourcesgit knowledged

26

Page 27: Angular and SEO - Greenlane All Hands Day 10/17/16

Resources• https://builtvisible.com/javascript-framework-seo/

• https://www.v9seo.com/blog/2016/07/08/seos-need-know-about-angularjs-sites/

• http://www.codelord.net/2016/01/20/setting-up-seo-on-an-angular-app/

• http://www.codelord.net/2015/05/12/angularjs-how-to-setup-pushstate-with-html5mode/

• http://www.angularjsseo.com/