Skip to content

Commit

Permalink
Updated documentation for amphtml
Browse files Browse the repository at this point in the history
  • Loading branch information
kpumuk committed Dec 6, 2016
1 parent afcbbc7 commit 382aef3
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 2.4.0 (Development)

Features:
- Added amphtml links support

Bugfixes:
- Fixed `place` attribute meta tag generation

## 2.3.1 (September 13, 2016)

Changes:
Expand Down
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,13 +252,32 @@ Further reading:

### image_src links

Basically, when you submit/share this to Facebook , this helps Facebook determine which image to put next to the link. If this is not present, Facebook tries to put in the first image it finds on the page, which may not be the best one to represent your site.
Basically, when you submit/share this to Facebook , this helps Facebook determine
which image to put next to the link. If this is not present, Facebook tries to
put in the first image it finds on the page, which may not be the best one to
represent your site.

```ruby
set_meta_tags image_src: "http://yoursite.com/icons/icon_32.png"
# <link rel="image_src" href="http://yoursite.com/icons/icon_32.png" />
```

### amphtml links

AMP is a way to build web pages for static content that render fast. If you have
two versions of the page – non-AMP and AMP, you can link the AMP version from
normal one using `amphtml` tag:

```ruby
set_meta_tags amphtml: url_for(format: :amp, only_path: false)
# <link rel="amphtml" href="https://www.example.com/document.amp">
```

To link back to normal version, use `canonical`.

* [What Is AMP?](https://www.ampproject.org/learn/about-amp/)
* [Make Your Page Discoverable](https://www.ampproject.org/docs/guides/discovery)

### Refresh interval and redirect URL

Meta refresh is a method of instructing a web browser to automatically
Expand Down

0 comments on commit 382aef3

Please sign in to comment.