Add meta generator tag with the Discourse version. Use a partial for common head elements.

This commit is contained in:
Neil Lalonde 2014-06-19 18:17:52 -04:00
parent 82693daa3d
commit 753610f8db
4 changed files with 20 additions and 35 deletions

View File

@ -0,0 +1,14 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="">
<meta name="generator" content="Discourse <%= Discourse::VERSION::STRING %> - Git Version <%= Discourse.git_version %>">
<link rel="icon" type="image/png" href="<%=SiteSetting.favicon_url%>">
<link rel="apple-touch-icon" type="image/png" href="<%=SiteSetting.apple_touch_icon_url%>">
<%= canonical_link_tag %>
<%= render partial: "common/special_font_face" %>
<%= render partial: "common/discourse_stylesheet" %>
<%= discourse_csrf_tags %>

View File

@ -3,19 +3,13 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title><%= content_for?(:title) ? yield(:title) + ' - ' + SiteSetting.title : SiteSetting.title %></title> <title><%= content_for?(:title) ? yield(:title) + ' - ' + SiteSetting.title : SiteSetting.title %></title>
<meta content="width=device-width, initial-scale=1.0" name="viewport"> <meta name="description" content="<%= @description_meta || SiteSetting.site_description %>">
<meta content="<%= @description_meta || SiteSetting.site_description %>" name="description"> <%= render partial: "layouts/head" %>
<meta content="" name="author">
<%- if SiteSetting.enable_escaped_fragments? %> <%- if SiteSetting.enable_escaped_fragments? %>
<meta name="fragment" content="!"> <meta name="fragment" content="!">
<%- end %> <%- end %>
<%= canonical_link_tag %>
<link rel="icon" type="image/png" href="<%=SiteSetting.favicon_url%>">
<link rel="apple-touch-icon" type="image/png" href="<%=SiteSetting.apple_touch_icon_url%>">
<%= script "preload_store" %> <%= script "preload_store" %>
<%= javascript_include_tag "locales/#{I18n.locale}" %> <%= javascript_include_tag "locales/#{I18n.locale}" %>
<%= script "vendor" %> <%= script "vendor" %>
@ -24,11 +18,6 @@
<%= script "admin"%> <%= script "admin"%>
<%- end %> <%- end %>
<%= render :partial => "common/special_font_face" %>
<%= render :partial => "common/discourse_stylesheet" %>
<%= discourse_csrf_tags %>
<%= raw SiteContent.content_for(:head) %> <%= raw SiteContent.content_for(:head) %>
<%= render_google_universal_analytics_code %> <%= render_google_universal_analytics_code %>
@ -92,8 +81,5 @@
<%= render :partial => "common/discourse_javascript" %> <%= render :partial => "common/discourse_javascript" %>
<%= render_google_analytics_code %> <%= render_google_analytics_code %>
<!-- Discourse Version: <%= Discourse::VERSION::STRING %> -->
<!-- Git Version: <%= Discourse.git_version %> -->
</body> </body>
</html> </html>

View File

@ -3,18 +3,8 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title><%= content_for?(:title) ? yield(:title) + ' - ' + SiteSetting.title : SiteSetting.title %></title> <title><%= content_for?(:title) ? yield(:title) + ' - ' + SiteSetting.title : SiteSetting.title %></title>
<meta content="width=device-width, initial-scale=1.0" name="viewport"> <meta name="description" content="<%= @description_meta || SiteSetting.site_description %>">
<meta content="<%= @description_meta || SiteSetting.site_description %>" name="description"> <%= render partial: "layouts/head" %>
<meta content="" name="author">
<%= canonical_link_tag %>
<link rel="icon" type="image/png" href="<%=SiteSetting.favicon_url%>">
<link rel="apple-touch-icon" type="image/png" href="<%=SiteSetting.apple_touch_icon_url%>">
<%= render :partial => "common/special_font_face" %>
<%= render :partial => "common/discourse_stylesheet" %>
<%= discourse_csrf_tags %>
<%= raw SiteContent.content_for(:head) %> <%= raw SiteContent.content_for(:head) %>
<%= yield :head %> <%= yield :head %>
</head> </head>

View File

@ -3,13 +3,8 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title><%=SiteSetting.title%></title> <title><%=SiteSetting.title%></title>
<meta content="width=device-width, initial-scale=1.0" name="viewport"> <meta name="description" content="">
<meta content="" name="description"> <%= render partial: "layouts/head" %>
<meta content="" name="author">
<link rel="icon" type="image/png" href=<%=SiteSetting.favicon_url%>>
<%= render :partial => "common/special_font_face" %>
<%= render :partial => "common/discourse_stylesheet" %>
<%= discourse_csrf_tags %>
<%= raw SiteContent.content_for(:head) %> <%= raw SiteContent.content_for(:head) %>
</head> </head>
<body> <body>