Skip to content

Commit

Permalink
MISC update
Browse files Browse the repository at this point in the history
  • Loading branch information
asika32764 committed Jun 7, 2015
1 parent 4d72cac commit 04e6d5f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ You can add some optional params.
use Asika\Sitemap\ChangeFreq;

$sitemap->addItem($url, '1.0', ChangeFreq::DAILY, '2015-06-07 10:51:20');
$sitemap->addItem($url, '0.7', ChangeFreq::WEEKLY, new \DateTime('2015-06-03 11:24:20'));
```

The first arguments are `loc`, `priority`, `changefreq` and `lastmod`. See this table:
The arguments are `loc`, `priority`, `changefreq` and `lastmod`. See this table:

| Params | Required | Description |
| ------ | -------- | ----------- |
Expand All @@ -51,7 +52,7 @@ The first arguments are `loc`, `priority`, `changefreq` and `lastmod`. See this

See: http://www.sitemaps.org/protocol.html#xmlTagDefinitions

Then we render it to XML:
### Render it to XML:

``` php
echo $sitemap->toString();
Expand Down Expand Up @@ -116,8 +117,14 @@ ChangeFreq::YEARLY;
ChangeFreq::NEVER;
```

The value "always" should be used to describe documents that change each time they are accessed. The value "never" should be used to describe archived URLs.
Please note that the value of this tag is considered a hint and not a command. Even though search engine crawlers may consider this information when making decisions, they may crawl pages marked "hourly" less frequently than that, and they may crawl pages marked "yearly" more frequently than that. Crawlers may periodically crawl pages marked "never" so that they can handle unexpected changes to those pages.
The value `always` should be used to describe documents that change each time they are accessed.

The value `never` should be used to describe archived URLs.

Please note that the value of this tag is considered a hint and not a command. Even though search engine crawlers may consider this information when making decisions,
they may crawl pages marked `hourly` less frequently than that, and they may crawl pages marked `yearly` more frequently than that.

Crawlers may periodically crawl pages marked `never` so that they can handle unexpected changes to those pages.

### priority

Expand Down
8 changes: 4 additions & 4 deletions src/Sitemap.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ class Sitemap extends AbstractSitemap
/**
* addItem
*
* @param string $loc
* @param string $priority
* @param string $changefreq
* @param string $lastmod
* @param string $loc
* @param string $priority
* @param string $changefreq
* @param string|\DateTime $lastmod
*
* @return static
*/
Expand Down

0 comments on commit 04e6d5f

Please sign in to comment.