From b5d99fc1874d4a365536a753faf592cae3c3cb14 Mon Sep 17 00:00:00 2001 From: teles Date: Sat, 26 Sep 2015 01:50:12 -0300 Subject: [PATCH] Setting basic project and creating the first list! --- .gitignore | 1 + README.md | 32 +++++++++++++++++++++++++-- package.json | 27 +++++++++++++++++++++++ run.js | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++ template.md | 6 +++++ 5 files changed, 126 insertions(+), 2 deletions(-) create mode 100644 .gitignore create mode 100644 package.json create mode 100644 run.js create mode 100644 template.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..096746c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/node_modules/ \ No newline at end of file diff --git a/README.md b/README.md index 6cdd064..adce5c0 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,30 @@ -# awesome-seo -A curated list of SEO links. +# Awesome SEO + A curated list of seo links! + +* [AHrefs](https://ahrefs.com) +* [Similar Web](http://www.similarweb.com/) +* [Sem Rush](http://www.semrush.com/) +* [Open Link Profiler](http://openlinkprofiler.org/) - Discover who is creating backlinks to your site +* [15 Awesome SEO Tools to Spy on Your Competitors](http://blog.mention.com/competitor-seo-tools/) +* [Spider simulator](http://tools.seochat.com/tools/search-spider-simulator) - Search engine spider simulator +* [Schema.org – Dando significado ao conteúdo na internet](http://blog.popupdesign.com.br/schema-org-dando-significado-ao-conteudo-na-internet/) - Blog post about schema.org implementation +* [Buzzsumo app](https://app.buzzsumo.com) - Analyze what content performs best for any topic or competiton +* [Open graph debugger](https://developers.facebook.com/tools/debug/og/object?) - Open graph online debugger +* [Keywordtool.io](http://keywordtool.io/) - Keyword searching online tool for google, youtube, appstore and bing +* [eBook O Guia Completo de SEO em 2015 e além](http://materiais.resultadosdigitais.com.br/guia-completo-seo) - Ebook about SEO written in portuguese +* [Understanding critical css](http://www.smashingmagazine.com/2015/08/understanding-critical-css/) - Technical article about critical css and how to make your site faster +* [Diretrizes para webmasters](https://support.google.com/webmasters/answer/35769) - Google guidelines for webmasters +* [Open graph protocol](http://opengraphprotocol.org/) - Meta tags protocol used by Facebook +* [Sitelinks search box](https://developers.google.com/structured-data/slsb-overview) - Everything you want to know about the search box +* [Moz seo toolbar](https://moz.com/tools/seo-toolbar) - SEO addon with many funcionalities +* [Rank scanner](http://app.rankscanner.com/) - Scan your site position per keyword +* [Complete List of HTML Meta Tags](https://gist.github.com/whitingx/3840905) +* [Google trends](https://www.google.com/trends/) - Discover the global trend topics from google +* [Internal link building](http://tools.seochat.com/tools/interlinking-plugin/) - Wordpress plugin to generate internal links +* [Free SEO Tools Collection](http://tools.seochat.com/) - Tons of free seo tools! +* [Enabling Rich Snippets for Products](https://developers.google.com/structured-data/rich-snippets/products?hl=en&rd=1) +* [Structured Data Testing Tool by Google](https://developers.google.com/structured-data/testing-tool/) - Check your site structured, like schema.org +* [WebPagetest](http://www.webpagetest.org/) - Test your website performance +* [Loader.io](https://loader.io/) - Cloud-based - Load testing +* [Page speed test by Google](https://developers.google.com/speed/pagespeed/insights/?hl=pt-BR) +* [Google mobile friendly](https://www.google.com/webmasters/tools/mobile-friendly) - Test your site mobile compatibility according to google diff --git a/package.json b/package.json new file mode 100644 index 0000000..bd90acb --- /dev/null +++ b/package.json @@ -0,0 +1,27 @@ +{ + "name": "awesome-seo", + "version": "1.0.0", + "description": "A curated list of SEO links.", + "main": "src/run.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/teles/awesome-seo.git" + }, + "keywords": [ + "seo", + "awesome", + "lists" + ], + "author": "Jota Teles", + "license": "MIT", + "bugs": { + "url": "https://github.com/teles/awesome-seo/issues" + }, + "homepage": "https://github.com/teles/awesome-seo#readme", + "dependencies": { + "handlebars": "^4.0.3" + } +} diff --git a/run.js b/run.js new file mode 100644 index 0000000..f166030 --- /dev/null +++ b/run.js @@ -0,0 +1,62 @@ +GLOBAL = {}; +GLOBAL.endpoint_url = "http://sheetsu.com/apis/736acdf9"; +GLOBAL.template_url = "template.md"; +GLOBAL.readme_url = "README.md"; + +var http = require("http"); +var handlebars = require('handlebars'); +var fs = require('fs'); + +var request = http.get(GLOBAL.endpoint_url, function (response) { + var buffer = ""; + var data; + var result; + + response.on("data", function (chunk) { + buffer += chunk; + }); + + response.on("end", function (err) { + data = JSON.parse(buffer); + var results = data.result; + var links = parseResultToLinks(results); + imprimeLinksParaREADME(links); + }); +}); + +function Link(title, href, description, category, language, tags){ + this.title = title; + this.href = href; + this.description = description; + this.category = category; + this.language = language; + this.tags = tags; +} + +function parseResultToLinks(results){ + var links = []; + for(var i=results.length-1; i >= 0; i--){ + var result = results[i]; + var title = result['Título']; + var href = result['Link']; + var description = result['Descrição']; + var category = result['Categoria']; + var language = result['Idioma']; + var tags = result['Tags'].split(","); + var link = new Link(title, href, description, category, language, tags); + links.push(link); + } + return links; +} + +function imprimeLinksParaREADME(links){ + fs.readFile(GLOBAL.template_url, 'utf-8', function(error, source){ + var template = handlebars.compile(source); + var markdown = template(links); + fs.writeFile(GLOBAL.readme_url, markdown, function(err) { + if(err) { + return console.log(err); + } + }); + }); +} \ No newline at end of file diff --git a/template.md b/template.md new file mode 100644 index 0000000..27fa5f2 --- /dev/null +++ b/template.md @@ -0,0 +1,6 @@ +# Awesome SEO + A curated list of seo links! + +{{#each this}} +* [{{title}}]({{href}}) {{#if description}}- {{description}} {{/if}} +{{/each}}