Skip to content

Commit

Permalink
updating docs and version
Browse files Browse the repository at this point in the history
  • Loading branch information
jwoertink committed Aug 8, 2018
1 parent 5946ba8 commit 1b23009
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,26 @@ Sitemapper.store(sitemaps, "my-prod-bucket/sitemaps")

Lastly, so the searchengines know where your sitemaps are located (unless you aliased `/sitemap_index.xml`), you'll want to update your [robots.txt](http://www.robotstxt.org/) with `Sitemap: https://my-sitemap-host.com`

## Notifying Search Engines

Once you have your sitemaps updated, it's usually a good idea to let the search engines know. Generally, they will crawl your site regularly anyway, but this at least gets things moving a little quicker. To do this, you can use the `ping_search_engines` method.

```crystal
sitemap_url = whatever_you_put_in_your_robots_txt
Sitemapper.ping_search_engines(sitemap_url)
# or
Sitemapper::PingBot.new(sitemap_url).ping
```

Currently this only pings Google and Bing. However, if you wanted to ping another engine like a custom one, or maybe Yandex, you can pass that in as well.

```crystal
# be sure to include %s so we know where to place your `sitemap_url`
Sitemapper.ping_search_engines(sitemap_url, yandex: "http://blogs.yandex.ru/pings/?status=success&url=%s")
```

## Development

Nothing fancy. Just pull down the repo, add code and make sure specs are passing.
Expand Down
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: sitemapper
version: 0.3.1.1
version: 0.4.0

authors:
- Jeremy Woertink <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion src/sitemapper.cr
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require "./sitemapper/storage"
require "./sitemapper/ping_bot"

module Sitemapper
VERSION = "0.3.1.1"
VERSION = "0.4.0"
@@configuration = Config.new

def self.configure
Expand Down

0 comments on commit 1b23009

Please sign in to comment.