Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Torann committed Oct 14, 2016
1 parent d50f972 commit 9bb879e
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 21 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
The BSD 2-Clause License
Copyright (c) 2015, Daniel Stainback <[email protected]>
Copyright (c) 2015-2016, Daniel Stainback <[email protected]>
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Expand Down
69 changes: 50 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,39 @@ $ composer require torann/json-ld

## Context Types

- event
- business
- place
- address
- geo
- review
- person
- organization
- article
- news_article
- blog_posting
- breadcrumbs
- search_box
- music_group
- music_album
- music_recording
- music_playlist
- article
- beach
- blog_posting
- breadcrumb_list
- contact_point
- corporation
- creative_work
- duration
- event
- geo_coordinates
- image_object
- invoice
- list_item
- local_business
- music_album
- music_group
- music_playlist
- music_recording
- news_article
- offer
- order
- organization
- person
- place
- postal_address
- price_specification
- product
- rating
- review
- search_box
- thing
- video_object
- web_page

## Examples

Expand All @@ -56,7 +72,7 @@ $ composer require torann/json-ld
#### Business

```php
$context = \JsonLd\Context::create('business', [
$context = \JsonLd\Context::create('local_business', [
'name' => 'Consectetur Adipiscing',
'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor',
'telephone' => '555-555-5555',
Expand Down Expand Up @@ -132,7 +148,7 @@ class BusinessPresenter extends Presenter
*/
public function jsonLd()
{
return Context::create('business', [
return Context::create('local_business', [
'name' => $this->entity->name,
'description' => $this->entity->description,
'telephone' => $this->entity->telephone,
Expand Down Expand Up @@ -170,6 +186,21 @@ echo $business->present()->jsonLd();

## Change Log

**v0.0.7**

- Add corporation
- Add the ability for custom context types
- Fix file structure to adhere to PSR-4 file structure

**v0.0.6**

- Code cleanup

**v0.0.5**

- Add duration
- Update place, review, and local_business

**v0.0.3**

- Add product
Expand Down
2 changes: 1 addition & 1 deletion docs/breadcrumbs.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Breadcrumb trails on a page indicate the page's position in the site hierarchy.
## Example

```php
$context = \JsonLd\Context::create('breadcrumbs', [
$context = \JsonLd\Context::create('breadcrumb_list', [
'itemListElement' => [
[
'url' => 'https://example.com/arts',
Expand Down

0 comments on commit 9bb879e

Please sign in to comment.