Skip to content

Commit

Permalink
Merge branch 'release/4.0.2'
Browse files Browse the repository at this point in the history
* release/4.0.2:
  polishing the api specs
  Cleanup
  Formatting
  Formatting
  Formatting
  Formatting
  Formatting
  Added api specifications
  fixed annotation
  • Loading branch information
austintoddj committed Feb 5, 2019
2 parents 65a7dd5 + 92c8da9 commit a594ff9
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 6 deletions.
2 changes: 1 addition & 1 deletion public/js/app.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/app.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"/js/app.js": "/js/app.js?id=f2b6d00ea31ac6565ac9",
"/js/app.js": "/js/app.js?id=2847b697dbf8a72662ba",
"/css/app.css": "/css/app.css?id=da72bd8307ebced7bed8",
"/js/app.js.map": "/js/app.js.map?id=9b6e8d3ac083f1dd4023",
"/js/app.js.map": "/js/app.js.map?id=e561de922c4a3d3b08da",
"/favicon.png": "/favicon.png?id=39d853e8c2bdbc38fde3"
}
52 changes: 51 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,57 @@ If you choose to design your own theme instead of the default, you can publish t
php artisan vendor:publish --provider="Canvas\CanvasServiceProvider" --tag="canvas-views"
```

If you want to use Unsplash images in your posts, you'll need to set up a new application at [https://unsplash.com/oauth/applications](https://unsplash.com/oauth/applications). Grab your access key and update `config/canvas.php`:
If you publish your own views, review the API specifications below to see available data for the public-facing endpoints:

<details>
<summary><b>API Specifications</b></summary>
<ul>
<li><b>GET </b><code>/blog</code> Returns a paginated index of posts</li>

<br>

```php
"data": [
"posts": "Illuminate\Pagination\Paginator"
]
```

<li><b>GET </b><code>/blog/{slug}</code> Returns a single blog post</li>

<br>

```php
"data": [
"author": "App\User",
"post": "App\Canvas\Post",
"meta": [
"og_title": "string"
"twitter_title": "string"
"og_description": "string"
"meta_description": "string"
"twitter_description": "string"
],
"next": "App\Canvas\Post",
"random": "App\Canvas\Post"
]
```

<li><b>GET </b><code>/blog/tag/{slug}</code> Returns a paginated index of posts for a single tag</li>

<br>

```php
"data": [
"topic": "Canvas/Tag",
"posts": "Illuminate\Pagination\Paginator"
]
```
</ul>
</details>

<br>

If you want to integrate Unsplash images into your content, set up a new application at [https://unsplash.com/oauth/applications](https://unsplash.com/oauth/applications). Grab your access key and update `config/canvas.php`:

```php
'unsplash' => [
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/Tag.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/**
* Convert a string to a slug.
*
* @source https://github.com/writingink/wink
* @source https://gist.github.com/mathewbyrne/1280286
*/
slugify(text) {
return text.toString().toLowerCase()
Expand Down

0 comments on commit a594ff9

Please sign in to comment.