mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
Keep only default data in SEO partial
Since the SEO partial will be in every page, we must keep either data that is the same for all pages, or pointers to the data that will be set dynamically in other pages.
This commit is contained in:
parent
7d90638eab
commit
df20108ec1
@ -1,50 +1,22 @@
|
||||
<%# This belongs inside the <head> tag %>
|
||||
<!-- Begin SEO partial -->
|
||||
|
||||
<link rel="publisher" href="https://plus.google.com/118076966717703203223" />
|
||||
|
||||
<%
|
||||
# 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 %>
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "http://schema.org/",
|
||||
"@type": "WebSite",
|
||||
"name": "<%= site_name %>",
|
||||
"description": "<%= site_description %>",
|
||||
"url": "<%= site_url %>",
|
||||
"sameAs" : [
|
||||
"http://indentapp.com"
|
||||
]
|
||||
}
|
||||
</script>
|
||||
<%# 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
|
||||
} %>
|
||||
<!-- End SEO partial -->
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title><%= content_for?(:title) ? yield(:title) : 'Notebook' %></title>
|
||||
<%= stylesheet_link_tag 'application' %>
|
||||
<%= javascript_include_tag 'application' %>
|
||||
<%= csrf_meta_tags %>
|
||||
@ -11,7 +10,7 @@
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.6/js/materialize.min.js"></script>
|
||||
|
||||
|
||||
<%# <title> is set in _seo.html.erb %>
|
||||
<%= render 'layouts/seo' %>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@ -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>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user