{"id":18613942,"url":"https://github.com/enthought/grunt-escaped-seo","last_synced_at":"2025-11-03T02:30:39.084Z","repository":{"id":20429044,"uuid":"23705662","full_name":"enthought/grunt-escaped-seo","owner":"enthought","description":"Default Repo description from terraform module","archived":false,"fork":false,"pushed_at":"2014-09-08T11:42:01.000Z","size":114,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-12-27T02:42:36.255Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/enthought.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-05T14:22:31.000Z","updated_at":"2021-06-01T16:22:45.000Z","dependencies_parsed_at":"2022-07-31T19:18:04.601Z","dependency_job_id":null,"html_url":"https://github.com/enthought/grunt-escaped-seo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enthought%2Fgrunt-escaped-seo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enthought%2Fgrunt-escaped-seo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enthought%2Fgrunt-escaped-seo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enthought%2Fgrunt-escaped-seo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/enthought","download_url":"https://codeload.github.com/enthought/grunt-escaped-seo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239406446,"owners_count":19633024,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T03:24:25.472Z","updated_at":"2025-11-03T02:30:39.028Z","avatar_url":"https://github.com/enthought.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grunt-escaped-seo\n\n\u003e Generate an SEO website for site with google escaped fragments\n\n## Getting Started\nThis plugin requires Grunt `~0.4.1`\n\nIf you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:\n\n```shell\nnpm install grunt-escaped-seo --save-dev\n```\n\nOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks('grunt-escaped-seo');\n```\n\nThis plugin require a local installation of PhantomJS (phantomjs.org/‎)\n\nAnd the npm \"phantom\" module `~0.6.1`\n\n## The \"escaped_seo\" task\n\n### Overview\nThank you to Mathieu Desvé (https://github.com/mazerte) who brought the idea and contributed to some of the code.\n\nUse this plugin to generate a static version of your \"single page application\" boosted with ajax. This version will be parsed by the googlebot. The generated sitemap.xml will help you to tell google to index your site.\n\nTo work with googlebot you need follow the google specifications (https://developers.google.com/webmasters/ajax-crawling/docs/specification). Use #! hash fragment in your urls or add a meta in your html page:\n```html\n\u003cmeta name=\"fragment\" content=\"!\"\u003e\n```\n\nDon't forget to add a redirect rule. In Exemple for htaccess with apache server :\n\n```html\n\u003cifModule mod_rewrite.c\u003e\n    RewriteCond %{QUERY_STRING} ^_escaped_fragment_=$\n    RewriteRule ^$ /seo/index.html [L]\n    RewriteCond %{QUERY_STRING} ^_escaped_fragment_=(.*)$\n    RewriteRule ^$ /seo/%1.html [L]\n\u003c/ifModule\u003e\n```\n\nAnd if you are using pushstate.\n\n```html\n\u003cifModule mod_rewrite.c\u003e\n    RewriteCond %{HTTP_USER_AGENT} (Googlebot|bingbot|Googlebot-Mobile|Baiduspider|Yahoo|YahooSeeker|DoCoMo|Twitterbot|TweetmemeBot|Twikle|Netseer|Daumoa|SeznamBot|Ezooms|MSNBot|Exabot|MJ12bot|sogou\\sspider|YandexBot|bitlybot|ia_archiver|proximic|spbot|ChangeDetection|NaverBot|MetaJobBot|magpie-crawler|Genieo\\sWeb\\sfilter|Qualidator.com\\sBot|Woko|Vagabondo|360Spider|ExB\\sLanguage\\sCrawler|AddThis.com|aiHitBot|Spinn3r|BingPreview|GrapeshotCrawler|CareerBot|ZumBot|ShopWiki|bixocrawler|uMBot|sistrix|linkdexbot|AhrefsBot|archive.org_bot|SeoCheckBot|TurnitinBot|VoilaBot|SearchmetricsBot|Butterfly|Yahoo!|Plukkie|yacybot|trendictionbot|UASlinkChecker|Blekkobot|Wotbox|YioopBot|meanpathbot|TinEye|LuminateBot|FyberSpider|Infohelfer|linkdex.com|Curious\\sGeorge|Fetch-Guess|ichiro|MojeekBot|SBSearch|WebThumbnail|socialbm_bot|SemrushBot|Vedma|alexa\\ssite\\saudit|SEOkicks-Robot|Browsershots|BLEXBot|woriobot|AMZNKAssocBot|Speedy|oBot|HostTracker|OpenWebSpider|WBSearchBot|FacebookExternalHit) [NC]\n    RewriteRule ^$ /seo/index.html [QSA,L]\n\n    RewriteCond %{HTTP_USER_AGENT} (Googlebot|bingbot|Googlebot-Mobile|Baiduspider|Yahoo|YahooSeeker|DoCoMo|Twitterbot|TweetmemeBot|Twikle|Netseer|Daumoa|SeznamBot|Ezooms|MSNBot|Exabot|MJ12bot|sogou\\sspider|YandexBot|bitlybot|ia_archiver|proximic|spbot|ChangeDetection|NaverBot|MetaJobBot|magpie-crawler|Genieo\\sWeb\\sfilter|Qualidator.com\\sBot|Woko|Vagabondo|360Spider|ExB\\sLanguage\\sCrawler|AddThis.com|aiHitBot|Spinn3r|BingPreview|GrapeshotCrawler|CareerBot|ZumBot|ShopWiki|bixocrawler|uMBot|sistrix|linkdexbot|AhrefsBot|archive.org_bot|SeoCheckBot|TurnitinBot|VoilaBot|SearchmetricsBot|Butterfly|Yahoo!|Plukkie|yacybot|trendictionbot|UASlinkChecker|Blekkobot|Wotbox|YioopBot|meanpathbot|TinEye|LuminateBot|FyberSpider|Infohelfer|linkdex.com|Curious\\sGeorge|Fetch-Guess|ichiro|MojeekBot|SBSearch|WebThumbnail|socialbm_bot|SemrushBot|Vedma|alexa\\ssite\\saudit|SEOkicks-Robot|Browsershots|BLEXBot|woriobot|AMZNKAssocBot|Speedy|oBot|HostTracker|OpenWebSpider|WBSearchBot|FacebookExternalHit) [NC]\n    RewriteCond %{REQUEST_FILENAME} !-f\n    RewriteCond %{REQUEST_FILENAME} !-d\n    RewriteRule ^[#!/]*([\\w\\/\\-_]*)$ /seo/$1.html [QSA,L]\n\u003c/ifModule\u003e\n```\n\nIn your project's Gruntfile, add a section named `escaped_seo` to the data object passed into `grunt.initConfig()`.\n\n```js\ngrunt.initConfig({\n  'escaped-seo': {\n    options: {\n      domain: 'http://yourdomain.com'\n    },\n  },\n})\n```\n\nIn your html code you can add a nofollow class inside some tags and these tags and its contents will be skipped\n\n```html\n\u003cdiv class=\"nofollow\"\u003e\n    This content will not be indexed\n\u003c/div\u003e\n```\n\n### Options\n\n#### options.domain\nType: `String`\n\nThe final domain of your site, used for the sitemap.xml\n\n#### options.server\nType: `String`\nDefault value: options.domain\n\nThe server to parse to generate the static version and the site tree. By default options.domain is used\n\n#### options.delay\nType: `Number`\nDefault value: `2000`\n\nTime to wait before capturing the page. Needed time for javascript to generate the whol page.\n\n#### options.public\nType: `String`\nDefault value: `dist`\n\nYour local current folder corresponding to the public document root folder. The sitemap and the static version will be created inside.\n\n#### options.folder\nType: `String`\nDefault value: `seo`\n\nA local folder into which this static html files will be created.\n\n#### options.changefreq\nType: `String`\nDefault value: `daily`\n\nThe changefreq value to use in the sitemap.xml\n\n#### options.replace\nType: `Object`\nDefault value: ``\n\nYou can define in this object some replace rules for the static html versions. Each value (String or RegExp) will be replace by the corresponding key. If you use String instead of RegExp only the first occurence will be replaced.\n\n#### options.urls\nType: `Array`\nDefault Value: `['']`\n\nThis contains the list of initial URLs to crawl.\n\n#### options.crawl\nType: `Boolean`\nDefault Value: `true`\n\nIf this value is set to `False` only the URLs mentioned in `options.urls` will be crawled and further links won't be crawled.\n\n### Usage Examples\n\n```coffee\n'escaped-seo':\n  options:\n    domain: 'http://pr0d.fr'\n    server: 'http://localhost:9001'\n    public: 'dist'\n    folder: 'seo'\n    changefreq: 'daily'\n    delay: 2000\n    replace: {\n      'contact@domain.com': /[a-z0-9_\\-\\.]+@[a-z0-9_\\-\\.]+\\.[a-z]*/gi\n    }\n```\n\n## Contributing\nIn lieu of a formal styleguide, take care to maintain the existing coding style.\n\n## Release History\n0.5.0   Add the no-follow possibility\n0.4.1   Add index on files inside folders if needed\n0.4.0   Add the protocol inside the sitemap loc\n0.3.1   Bug correction with sitemap domain\n0.3.0   Bug correction with redirection domain\n0.2.0   Pushstate compatibility added\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenthought%2Fgrunt-escaped-seo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenthought%2Fgrunt-escaped-seo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenthought%2Fgrunt-escaped-seo/lists"}