diff --git a/app/views/layouts/_seo.html.erb b/app/views/layouts/_seo.html.erb index 508e5c03..88b0805d 100644 --- a/app/views/layouts/_seo.html.erb +++ b/app/views/layouts/_seo.html.erb @@ -1,50 +1,22 @@ <%# This belongs inside the tag %> + - - -<% - # All of these values can be overridden elsewhere by using the set_meta_tags function - - # Make sure description is no longer than 155 characters - site_name = "Notebook" - site_description = "Notebook is a set of tools for writers, game designers, and roleplayers to create magnificent universes, and everything within them." - site_url = request.host - site_image = "http://www.notebook.ai/assets/card-headers/hero-d5161eb41a02535f6656af83cacbdb8c.jpg" - - set_meta_tags description: site_description, - # Recommended keywords tag length: up to 255 characters, 20 words. - keywords: %w[writing author fiction character universe location nanowrimo], - canonical: site_url, - twitter: { - card: "summary", - title: site_name, - url: site_url, - description: site_description, # Page description must be less than 200 characters - creator: "@IndentLabs", - image: { - # Twitter summary card with large image must be at least 280x150px - src: site_image - } - }, - og: { - title: site_name, - type: "website", - url: site_url, - image: site_image, - description: site_description, - site_name: site_name, - } - %> - <%= display_meta_tags %> - +<%# Default values and pointers here only. +Most content should be set in the pages themselves %> +<%= display_meta_tags site: "Notebook", +publisher: "https://plus.google.com/118076966717703203223", +og: { + title: :title, + site_name: "Notebook", + image: :image_src, + url: request.url, + description: :description, +}, +twitter: { + card: "summary", + title: :title, + image: :image_src, + url: request.url, + description: :description +} %> + diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index a2403b01..f181e22b 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,7 +1,6 @@ - <%= content_for?(:title) ? yield(:title) : 'Notebook' %> <%= stylesheet_link_tag 'application' %> <%= javascript_include_tag 'application' %> <%= csrf_meta_tags %> @@ -11,7 +10,7 @@ - + <%# is set in _seo.html.erb %> <%= render 'layouts/seo' %> </head> <body> diff --git a/app/views/main/index.html.erb b/app/views/main/index.html.erb index 51181999..c7aff17c 100644 --- a/app/views/main/index.html.erb +++ b/app/views/main/index.html.erb @@ -3,11 +3,12 @@ <div class="card"> <div class="card-image"> <%= image_tag 'card-headers/hero.jpg', width: '100%' %> + <% set_meta_tags image_src: image_url('card-headers/hero.jpg') %> <span class="card-title">Your digital notebook is here.</span> </div> <div class="card-content"> <h4> - Notebook is a set of tools for writers, game designers, and roleplayers to create magnificent universes – and everything within them. + <%= description 'Notebook is a set of tools for writers, game designers, and roleplayers to create magnificent universes – and everything within them.' %> </h4> <p> From a simple interface in your browser, on your phone, or on your tablet, you can do everything you'd ever want to do while creating your own little (or big!) world. @@ -19,4 +20,3 @@ </div> </div> </div> -