Sha256: d82ad4a120d8e8662ac5b76e3f0e2d9d8561e74f05e557a7cdf3533eaeb2c12b
Contents?: true
Size: 1.77 KB
Versions: 5
Compression:
Stored size: 1.77 KB
Contents
# Middleman Metaman ![Metman Logo](metaman.jpg) By [Cache Ventures](https://cacheventures.com). Metaman makes it easy to manage your meta tags on a Middleman site. ## Installation Add this line to your application's Gemfile: ```ruby gem 'middleman-metaman' ``` And then execute: $ bundle Or install it yourself as: $ gem install middleman-metaman ## Configuration Within the config.rb of the middleman project, include the line ```ruby activate :metaman, host: 'https://domain.com' ``` ## Usage Put this in the head of your site ```erb <%= display_meta_tags %> ``` You can set meta tags using multiple methods. The order of priority from lowest to highest is defaults (data/meta_tags.yml), translations, front matter, page specific variables set via `set_meta_tags` in a template. ### Setting Defaults The defaults file lives in `data/meta_tags.yml`. You can set any meta tag you would like. It will be converted to a hash and merged during page generation. Nested parameters like `{ og: { title: 'My Title' } }` will become `og:title`. ### Setting via Templates ```erb <% set_meta_tags(title: 'My Title', og: { image: 'meta-image.png' } ) ``` ### Setting via Front Matter Only the `title` and `description` can be set via Front Matter at this time. ### Setting via Translations The gem will look for translations like so. If your page is called `thank_you.html.erb` your translations should go under en > thank_you > meta > `...` ## Image Handling Any key that includes `image` in it will automatically have the host prepended and will use the `image_path` helper. ## Property / Name Attribute This gem currently supports generating meta tags using the property attribute for any meta tags that start with `og:`, `music:`, `music:`, `video:`, `article:`, `book:`, `profile:`.
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
middleman-metaman-0.1.14 | README.md |
middleman-metaman-0.1.13 | README.md |
middleman-metaman-0.1.12 | README.md |
middleman-metaman-0.1.11 | README.md |
middleman-metaman-0.1.10 | README.md |