diff options
author | Marcia Ramos <virtua.creative@gmail.com> | 2018-04-03 20:52:24 +0300 |
---|---|---|
committer | Marcia Ramos <virtua.creative@gmail.com> | 2018-04-03 20:52:24 +0300 |
commit | c6d397c57537db4990c5a48aaa4e3d628137c147 (patch) | |
tree | dead440a1e894da4893c8b54c56d8ace6385173d /layouts | |
parent | 5e49e3242d831560ef3bfff690c21f54c8acd910 (diff) |
Metadata improvements
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/default.html | 3 | ||||
-rw-r--r-- | layouts/head.html | 54 | ||||
-rw-r--r-- | layouts/home.html | 11 | ||||
-rw-r--r-- | layouts/instantsearch.html | 3 | ||||
-rw-r--r-- | layouts/schema-microdata.html | 51 |
5 files changed, 70 insertions, 52 deletions
diff --git a/layouts/default.html b/layouts/default.html index 3b2e22bc..730df5be 100644 --- a/layouts/default.html +++ b/layouts/default.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US" prefix="og: http://ogp.me/ns#"> <head> <%= render '/head.*' %> <%= render '/canonical_urls.*' %> @@ -67,5 +67,6 @@ <%= render '/docsearch.*' %> <%= render '/analytics.*' %> <%= render '/https_redirect.*' %> + <%= render '/schema-microdata.*' %> </body> </html> diff --git a/layouts/head.html b/layouts/head.html index 4ce4d555..3c336ee1 100644 --- a/layouts/head.html +++ b/layouts/head.html @@ -1,5 +1,9 @@ <meta charset="utf-8"> -<title><%= @item.key?(:title) ? "#{item[:title]} - GitLab Documentation" : "GitLab Documentation" %></title> +<% if @item.identifier.to_s.split('/').count == 2 %> + <title><%= @item[:title] %></title> +<% else %> + <title><%= @item.key?(:title) ? "#{item[:title]} | GitLab" : "GitLab Documentation" %></title> +<% end %> <% if @item[:description] %> <meta name="description" content="<%= @item[:description] %>"> <% else %> @@ -22,51 +26,3 @@ <meta name="generator" content="Nanoc <%= Nanoc::VERSION %>"> <!-- Algolia Searching from the URL bar https://www.algolia.com/doc/tutorials/search-ui/ux-patterns/search-from-the-url-bar/ --> <link href='/opensearch.xml' rel='search' title='Search through GitLab Docs' type='application/opensearchdescription+xml'> -<script type="application/ld+json"> -{ - "@context":"http://schema.org", - "@type":"Organization", - "name":"GitLab", - "legalName":"GitLab Inc.", - "url":"https://about.gitlab.com", - "logo":"https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo.png", - "foundingDate":"2011", - "founders":[ - { - "@type":"Person", - "name":"Sid Sijbrandij" - }, - { - "@type":"Person", - "name":"Dmitriy Zaporozhets" - }], - "address": - { - "@type":"PostalAddress", - "streetAddress":"1233 Howard St 2F", - "addressLocality":"San Francisco", - "addressRegion":"CA", - "postalCode":"94103", - "addressCountry":"USA" - }, - "sameAs":[ - "https://www.facebook.com/gitlab", - "https://twitter.com/gitlab", - "https://www.linkedin.com/company/gitlab-com", - "https://plus.google.com/107491817347842790515/", - "https://www.youtube.com/channel/UCnMGQ8QHMAnVIsI3xJrihhg"] -} -</script> -<script type="application/ld+json"> -{ - "@context":"http://schema.org", - "@type": "WebSite", - "name": "GitLab Documentation", - "url": "https://docs.gitlab.com", - "potentialAction": { - "@type": "SearchAction", - "target": "https://docs.gitlab.com/?s={search_term}", - "query-input": "required name=search_term" - } -} -</script> diff --git a/layouts/home.html b/layouts/home.html index 9f54923e..8d8ff2f9 100644 --- a/layouts/home.html +++ b/layouts/home.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US" prefix="og: http://ogp.me/ns#"> <head> <%= render '/head.*' %> <link rel="canonical" href="<%= @config[:base_url] %>/"> @@ -16,5 +16,14 @@ <%= render '/docsearch.*' %> <%= render '/analytics.*' %> <%= render '/https_redirect.*' %> + <%= render '/schema-microdata.*' %> + <script type="application/ld+json"> //this homepage only + { + "@context": "http://schema.org", + "@type": "WebPage", + "url": "https://docs.gitlab.com/", + "name": "GitLab Documentation" + } + </script> </body> </html> diff --git a/layouts/instantsearch.html b/layouts/instantsearch.html index ca5e9a15..b07c9264 100644 --- a/layouts/instantsearch.html +++ b/layouts/instantsearch.html @@ -1,5 +1,5 @@ <!DOCTYPE HTML> -<html lang="en"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US" prefix="og: http://ogp.me/ns#"> <head> <%= render '/head.*' %> <link rel="canonical" href="<%= @config[:base_url] %>/search/"> @@ -25,5 +25,6 @@ <%= render '/footer.*' %> <%= render '/analytics.*' %> <%= render '/https_redirect.*' %> + <%= render '/schema-microdata.*' %> </body> </html> diff --git a/layouts/schema-microdata.html b/layouts/schema-microdata.html new file mode 100644 index 00000000..6b7f09ac --- /dev/null +++ b/layouts/schema-microdata.html @@ -0,0 +1,51 @@ +<script type="application/ld+json"> +{ + "@context":"http://schema.org", + "@type":"Organization", + "name":"GitLab", + "legalName":"GitLab Inc.", + "url":"https://about.gitlab.com", + "logo":"https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo.png", + "foundingDate":"2011", + "founders":[ + { + "@type":"Person", + "name":"Sid Sijbrandij" + }, + { + "@type":"Person", + "name":"Dmitriy Zaporozhets" + }], + "address": + { + "@type":"PostalAddress", + "streetAddress":"1233 Howard St 2F", + "addressLocality":"San Francisco", + "addressRegion":"CA", + "postalCode":"94103", + "addressCountry":"USA" + }, + "sameAs":[ + "https://gitlab.com/", + "https://docs.gitlab.com/", + "https://www.facebook.com/gitlab", + "https://twitter.com/gitlab", + "https://www.linkedin.com/company/gitlab-com", + "https://plus.google.com/107491817347842790515/", + "https://en.wikipedia.org/wiki/GitLab", + "https://www.youtube.com/channel/UCnMGQ8QHMAnVIsI3xJrihhg"] +} +</script> +<script type="application/ld+json"> +{ + "@context":"http://schema.org", + "@type": "WebSite", + "name": "GitLab Documentation", + "url": "https://docs.gitlab.com/", + "potentialAction": { + "@type": "SearchAction", + "target": "https://docs.gitlab.com/search/?q={search_term_string}", + "query-input": "required name=search_term_string" + } +} +</script> |