mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 03:43:45 +08:00
Add meta generator tag with the Discourse version. Use a partial for common head elements.
This commit is contained in:
parent
82693daa3d
commit
753610f8db
14
app/views/layouts/_head.html.erb
Normal file
14
app/views/layouts/_head.html.erb
Normal 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 %>
|
|
@ -3,19 +3,13 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title><%= content_for?(:title) ? yield(:title) + ' - ' + SiteSetting.title : SiteSetting.title %></title>
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport">
|
||||
<meta content="<%= @description_meta || SiteSetting.site_description %>" name="description">
|
||||
<meta content="" name="author">
|
||||
<meta name="description" content="<%= @description_meta || SiteSetting.site_description %>">
|
||||
<%= render partial: "layouts/head" %>
|
||||
|
||||
<%- if SiteSetting.enable_escaped_fragments? %>
|
||||
<meta name="fragment" content="!">
|
||||
<%- 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" %>
|
||||
<%= javascript_include_tag "locales/#{I18n.locale}" %>
|
||||
<%= script "vendor" %>
|
||||
|
@ -24,11 +18,6 @@
|
|||
<%= script "admin"%>
|
||||
<%- end %>
|
||||
|
||||
<%= render :partial => "common/special_font_face" %>
|
||||
<%= render :partial => "common/discourse_stylesheet" %>
|
||||
|
||||
<%= discourse_csrf_tags %>
|
||||
|
||||
<%= raw SiteContent.content_for(:head) %>
|
||||
|
||||
<%= render_google_universal_analytics_code %>
|
||||
|
@ -92,8 +81,5 @@
|
|||
<%= render :partial => "common/discourse_javascript" %>
|
||||
|
||||
<%= render_google_analytics_code %>
|
||||
|
||||
<!-- Discourse Version: <%= Discourse::VERSION::STRING %> -->
|
||||
<!-- Git Version: <%= Discourse.git_version %> -->
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -3,18 +3,8 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title><%= content_for?(:title) ? yield(:title) + ' - ' + SiteSetting.title : SiteSetting.title %></title>
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport">
|
||||
<meta content="<%= @description_meta || SiteSetting.site_description %>" name="description">
|
||||
<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 %>
|
||||
<meta name="description" content="<%= @description_meta || SiteSetting.site_description %>">
|
||||
<%= render partial: "layouts/head" %>
|
||||
<%= raw SiteContent.content_for(:head) %>
|
||||
<%= yield :head %>
|
||||
</head>
|
||||
|
|
|
@ -3,13 +3,8 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title><%=SiteSetting.title%></title>
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport">
|
||||
<meta content="" name="description">
|
||||
<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 %>
|
||||
<meta name="description" content="">
|
||||
<%= render partial: "layouts/head" %>
|
||||
<%= raw SiteContent.content_for(:head) %>
|
||||
</head>
|
||||
<body>
|
||||
|
|
Loading…
Reference in New Issue
Block a user