railsui 3.3.4 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -4
- data/app/views/railsui/systems/helpers/railsui_head.html.erb +1 -1
- data/app/views/railsui/themes/shepherd/content/typography/_fonts.html.erb +1 -1
- data/lib/generators/railsui/install/templates/themes/corgie/views/layouts/rui/railsui.html.erb +0 -8
- data/lib/generators/railsui/install/templates/themes/corgie/views/layouts/rui/railsui_admin.html.erb +0 -8
- data/lib/generators/railsui/install/templates/themes/corgie/views/layouts/rui/railsui_auth.html.erb +0 -8
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/_meta.html.erb +32 -76
- data/lib/generators/railsui/install/templates/themes/hound/views/layouts/rui/railsui.html.erb +0 -7
- data/lib/generators/railsui/install/templates/themes/hound/views/layouts/rui/railsui_admin.html.erb +0 -7
- data/lib/generators/railsui/install/templates/themes/hound/views/rui/shared/_meta.html.erb +32 -76
- data/lib/generators/railsui/install/templates/themes/shepherd/views/layouts/rui/railsui.html.erb +0 -7
- data/lib/generators/railsui/install/templates/themes/shepherd/views/layouts/rui/railsui_admin.html.erb +0 -7
- data/lib/generators/railsui/install/templates/themes/shepherd/views/rui/shared/_meta.html.erb +32 -76
- data/lib/railsui/engine.rb +1 -0
- data/lib/railsui/meta_tags_helper.rb +47 -0
- data/lib/railsui/version.rb +1 -1
- data/lib/railsui.rb +1 -1
- metadata +3 -16
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 404aaf50979044585d9326845924b0327c0b24b09759dfcaca9aed88a6f601d1
|
|
4
|
+
data.tar.gz: 688bc1d816dc9ed505c28460af27eb71e1a9551f3d9c2df17240107c00ae369d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7cab20804f8910e6edfe46297dee41a457dbd2e534d19aa1d39993af6385c75aa318827bafc9d5224d10b69beb9b7d2dc7ba24b57ac301a7a9906db649eef441
|
|
7
|
+
data.tar.gz: 3f459a56366229614e431881caf7a2e2a8400c73991e1d5aa0fc146aa9fbe8690b25c705d8c0004220e87951cf7d5b29ced45fe5df3300f6609c775f26cea7cf
|
data/Gemfile.lock
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
railsui (3.
|
|
5
|
-
meta-tags
|
|
4
|
+
railsui (3.4.0)
|
|
6
5
|
psych
|
|
7
6
|
rails (>= 7.0)
|
|
8
7
|
railsui_icon
|
|
@@ -114,8 +113,6 @@ GEM
|
|
|
114
113
|
net-pop
|
|
115
114
|
net-smtp
|
|
116
115
|
marcel (1.0.4)
|
|
117
|
-
meta-tags (2.22.0)
|
|
118
|
-
actionpack (>= 6.0.0, < 8.1)
|
|
119
116
|
mini_mime (1.1.5)
|
|
120
117
|
minitest (5.25.1)
|
|
121
118
|
net-imap (0.4.16)
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
<% content_for :erb, flush: true do %>
|
|
27
27
|
<!-- app/views/code/layouts/rui/railsui.html.erb -->
|
|
28
28
|
|
|
29
|
-
<!-- Meta tags via
|
|
29
|
+
<!-- Meta tags via railsui_meta_tags helper. Customize yours at app/views/rui/shared/_meta.html.erb -->
|
|
30
30
|
<%%= render "rui/shared/meta" %>
|
|
31
31
|
|
|
32
32
|
<!-- Custom fonts for each theme -->
|
|
@@ -24,6 +24,6 @@
|
|
|
24
24
|
</div>
|
|
25
25
|
|
|
26
26
|
<div class="prose-sm prose-neutral dark:prose-invert">
|
|
27
|
-
<p><strong>Tip</strong>: To change fonts, you'll need to reference
|
|
27
|
+
<p><strong>Tip</strong>: To change fonts, you'll need to reference them in both <code>app/views/rui/shared/_fonts.html.erb</code> and <code>app/assets/stylesheets/railsui/theme.css</code>.</p>
|
|
28
28
|
</div>
|
|
29
29
|
</div>
|
data/lib/generators/railsui/install/templates/themes/corgie/views/layouts/rui/railsui.html.erb
CHANGED
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
|
-
<title>
|
|
5
|
-
<%= Railsui.config.application_name || "Rails UI" %>
|
|
6
|
-
</title>
|
|
7
|
-
<meta charset="UTF-8" />
|
|
8
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
9
|
-
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
10
|
-
<meta name="mobile-web-app-capable" content="yes">
|
|
11
|
-
|
|
12
4
|
<%= csrf_meta_tags %>
|
|
13
5
|
<%= csp_meta_tag %>
|
|
14
6
|
|
data/lib/generators/railsui/install/templates/themes/corgie/views/layouts/rui/railsui_admin.html.erb
CHANGED
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
|
-
<title>
|
|
5
|
-
<%= Railsui.config.application_name || "Rails UI" %>
|
|
6
|
-
</title>
|
|
7
|
-
<meta charset="UTF-8" />
|
|
8
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
9
|
-
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
10
|
-
<meta name="mobile-web-app-capable" content="yes">
|
|
11
|
-
|
|
12
4
|
<%= csrf_meta_tags %>
|
|
13
5
|
<%= csp_meta_tag %>
|
|
14
6
|
|
data/lib/generators/railsui/install/templates/themes/corgie/views/layouts/rui/railsui_auth.html.erb
CHANGED
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
|
-
<title>
|
|
5
|
-
<%= Railsui.config.application_name || "Rails UI" %>
|
|
6
|
-
</title>
|
|
7
|
-
<meta charset="UTF-8" />
|
|
8
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
9
|
-
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
10
|
-
<meta name="mobile-web-app-capable" content="yes">
|
|
11
|
-
|
|
12
4
|
<%= csrf_meta_tags %>
|
|
13
5
|
<%= csp_meta_tag %>
|
|
14
6
|
|
|
@@ -1,90 +1,46 @@
|
|
|
1
1
|
<%#
|
|
2
|
+
Meta tags for SEO and social sharing.
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
This uses Rails UI's built-in railsui_meta_tags helper which outputs:
|
|
5
|
+
- Title tag
|
|
6
|
+
- Viewport meta tag
|
|
7
|
+
- Description meta tag
|
|
8
|
+
- Canonical URL
|
|
9
|
+
- Open Graph tags (title, type, url, image, description, site_name)
|
|
10
|
+
- Social card tags (card, title, description, image)
|
|
11
|
+
- Favicon links
|
|
4
12
|
|
|
5
|
-
|
|
13
|
+
Basic Usage:
|
|
6
14
|
|
|
7
|
-
|
|
15
|
+
railsui_meta_tags
|
|
8
16
|
|
|
9
|
-
|
|
10
|
-
https://redketchup.io/favicon-generator (generate from an image)
|
|
17
|
+
Customizing per-page:
|
|
11
18
|
|
|
12
|
-
|
|
19
|
+
railsui_meta_tags(
|
|
20
|
+
title: "About Us",
|
|
21
|
+
description: "Learn more about our company."
|
|
22
|
+
)
|
|
13
23
|
|
|
14
|
-
|
|
15
|
-
https://figma.com
|
|
24
|
+
All available options:
|
|
16
25
|
|
|
17
|
-
|
|
18
|
-
|
|
26
|
+
railsui_meta_tags(
|
|
27
|
+
site: "My App",
|
|
28
|
+
title: "Page Title",
|
|
29
|
+
description: "Page description",
|
|
30
|
+
image: "meta/opengraph.jpg",
|
|
31
|
+
card_image: "meta/card.jpg",
|
|
32
|
+
og_type: "website",
|
|
33
|
+
card_type: "summary"
|
|
34
|
+
)
|
|
19
35
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
Title:
|
|
24
|
-
Change the title and description tags below to match your own site. The title displays alongside your site name in a given browser tab next to the favicon.
|
|
25
|
-
|
|
26
|
-
Description:
|
|
27
|
-
The description is a good place for one to two sentences describing a page OR what the site is all about. You can tweak this on a per-page basis inside your views or controllers. See the metatags gem documentation on tips for doing so: https://github.com/kpumuk/meta-tags#mirrored-values
|
|
36
|
+
Previewing: https://www.opengraph.xyz/
|
|
37
|
+
Generate icons: https://redketchup.io/favicon-generator
|
|
28
38
|
|
|
29
39
|
Images:
|
|
30
|
-
Swap your own images for placeholder ones inside the "assets/images/railsui/meta" folder
|
|
40
|
+
Swap your own images for placeholder ones inside the "assets/images/railsui/meta" folder.
|
|
31
41
|
%>
|
|
32
42
|
|
|
33
|
-
<%=
|
|
34
|
-
site: "#{Railsui.config.application_name.parameterize}.com", # <!-- change -->,
|
|
35
|
-
reverse: true,
|
|
36
|
-
viewport: "width=device-width, initial-scale=1",
|
|
43
|
+
<%= railsui_meta_tags(
|
|
37
44
|
title: "CHANGE ME",
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
title: Railsui.config.application_name,
|
|
41
|
-
type: "website",
|
|
42
|
-
url: request.original_url,
|
|
43
|
-
image: [{
|
|
44
|
-
_: image_url("railsui/meta/opengraph.jpg"),
|
|
45
|
-
width: 1200,
|
|
46
|
-
height: 630
|
|
47
|
-
}],
|
|
48
|
-
site_name: "#{Railsui.config.application_name.parameterize}.com", # <!-- change -->
|
|
49
|
-
description: "CHANGE ME",
|
|
50
|
-
},
|
|
51
|
-
twitter: {
|
|
52
|
-
title: :title,
|
|
53
|
-
description: :description,
|
|
54
|
-
card: "summary",
|
|
55
|
-
image: {
|
|
56
|
-
_: image_url("railsui/meta/opengraph-mark.jpg"),
|
|
57
|
-
width: 400,
|
|
58
|
-
height: 400,
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
author: Railsui.config.application_name,
|
|
62
|
-
description: "CHANGE ME",
|
|
63
|
-
icon: [
|
|
64
|
-
{
|
|
65
|
-
href: image_url("railsui/meta/favicon.svg"),
|
|
66
|
-
sizes: 'any',
|
|
67
|
-
type: "image/svg+xml"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
href: image_url("railsui/meta/favicon-16x16.png"),
|
|
71
|
-
sizes: "16x16",
|
|
72
|
-
type: "images/png"
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
href: image_url("railsui/meta/android-chrome-192x192.png"),
|
|
76
|
-
sizes: '192x192',
|
|
77
|
-
type: "image/png"
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
href: image_url("railsui/meta/android-chrome-512x512.png"),
|
|
81
|
-
sizes: '512x512',
|
|
82
|
-
type: "image/png"
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
href: image_url("railsui/meta/apple-touch-icon.png"),
|
|
86
|
-
sizes: '180x180',
|
|
87
|
-
type: "image/png"
|
|
88
|
-
}
|
|
89
|
-
])
|
|
90
|
-
%>
|
|
45
|
+
description: "CHANGE ME"
|
|
46
|
+
) %>
|
data/lib/generators/railsui/install/templates/themes/hound/views/layouts/rui/railsui.html.erb
CHANGED
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
|
-
<title>
|
|
5
|
-
<%= Railsui.config.application_name || "Rails UI" %>
|
|
6
|
-
</title>
|
|
7
|
-
<meta charset="UTF-8" />
|
|
8
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
9
|
-
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
10
|
-
<meta name="mobile-web-app-capable" content="yes">
|
|
11
4
|
<%= csrf_meta_tags %>
|
|
12
5
|
<%= csp_meta_tag %>
|
|
13
6
|
|
data/lib/generators/railsui/install/templates/themes/hound/views/layouts/rui/railsui_admin.html.erb
CHANGED
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
|
-
<title>
|
|
5
|
-
<%= Railsui.config.application_name || "Rails UI" %>
|
|
6
|
-
</title>
|
|
7
|
-
<meta charset="UTF-8" />
|
|
8
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
9
|
-
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
10
|
-
<meta name="mobile-web-app-capable" content="yes">
|
|
11
4
|
<%= csrf_meta_tags %>
|
|
12
5
|
<%= csp_meta_tag %>
|
|
13
6
|
|
|
@@ -1,90 +1,46 @@
|
|
|
1
1
|
<%#
|
|
2
|
+
Meta tags for SEO and social sharing.
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
This uses Rails UI's built-in railsui_meta_tags helper which outputs:
|
|
5
|
+
- Title tag
|
|
6
|
+
- Viewport meta tag
|
|
7
|
+
- Description meta tag
|
|
8
|
+
- Canonical URL
|
|
9
|
+
- Open Graph tags (title, type, url, image, description, site_name)
|
|
10
|
+
- Social card tags (card, title, description, image)
|
|
11
|
+
- Favicon links
|
|
4
12
|
|
|
5
|
-
|
|
13
|
+
Basic Usage:
|
|
6
14
|
|
|
7
|
-
|
|
15
|
+
railsui_meta_tags
|
|
8
16
|
|
|
9
|
-
|
|
10
|
-
https://redketchup.io/favicon-generator (generate from an image)
|
|
17
|
+
Customizing per-page:
|
|
11
18
|
|
|
12
|
-
|
|
19
|
+
railsui_meta_tags(
|
|
20
|
+
title: "About Us",
|
|
21
|
+
description: "Learn more about our company."
|
|
22
|
+
)
|
|
13
23
|
|
|
14
|
-
|
|
15
|
-
https://figma.com
|
|
24
|
+
All available options:
|
|
16
25
|
|
|
17
|
-
|
|
18
|
-
|
|
26
|
+
railsui_meta_tags(
|
|
27
|
+
site: "My App",
|
|
28
|
+
title: "Page Title",
|
|
29
|
+
description: "Page description",
|
|
30
|
+
image: "meta/opengraph.jpg",
|
|
31
|
+
card_image: "meta/card.jpg",
|
|
32
|
+
og_type: "website",
|
|
33
|
+
card_type: "summary"
|
|
34
|
+
)
|
|
19
35
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
Title:
|
|
24
|
-
Change the title and description tags below to match your own site. The title displays alongside your site name in a given browser tab next to the favicon.
|
|
25
|
-
|
|
26
|
-
Description:
|
|
27
|
-
The description is a good place for one to two sentences describing a page OR what the site is all about. You can tweak this on a per-page basis inside your views or controllers. See the metatags gem documentation on tips for doing so: https://github.com/kpumuk/meta-tags#mirrored-values
|
|
36
|
+
Previewing: https://www.opengraph.xyz/
|
|
37
|
+
Generate icons: https://redketchup.io/favicon-generator
|
|
28
38
|
|
|
29
39
|
Images:
|
|
30
|
-
Swap your own images for placeholder ones inside the "assets/images/railsui/meta" folder
|
|
40
|
+
Swap your own images for placeholder ones inside the "assets/images/railsui/meta" folder.
|
|
31
41
|
%>
|
|
32
42
|
|
|
33
|
-
<%=
|
|
34
|
-
site: "#{Railsui.config.application_name.parameterize}.com", # <!-- change -->,
|
|
35
|
-
reverse: true,
|
|
36
|
-
viewport: "width=device-width, initial-scale=1",
|
|
43
|
+
<%= railsui_meta_tags(
|
|
37
44
|
title: "CHANGE ME",
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
title: Railsui.config.application_name,
|
|
41
|
-
type: "website",
|
|
42
|
-
url: request.original_url,
|
|
43
|
-
image: [{
|
|
44
|
-
_: image_url("railsui/meta/opengraph.jpg"),
|
|
45
|
-
width: 1200,
|
|
46
|
-
height: 630
|
|
47
|
-
}],
|
|
48
|
-
site_name: "#{Railsui.config.application_name.parameterize}.com", # <!-- change -->
|
|
49
|
-
description: "CHANGE ME",
|
|
50
|
-
},
|
|
51
|
-
twitter: {
|
|
52
|
-
title: :title,
|
|
53
|
-
description: :description,
|
|
54
|
-
card: "summary",
|
|
55
|
-
image: {
|
|
56
|
-
_: image_url("railsui/meta/opengraph-mark.jpg"),
|
|
57
|
-
width: 400,
|
|
58
|
-
height: 400,
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
author: Railsui.config.application_name,
|
|
62
|
-
description: "CHANGE ME",
|
|
63
|
-
icon: [
|
|
64
|
-
{
|
|
65
|
-
href: image_url("railsui/meta/favicon.svg"),
|
|
66
|
-
sizes: 'any',
|
|
67
|
-
type: "image/svg+xml"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
href: image_url("railsui/meta/favicon-16x16.png"),
|
|
71
|
-
sizes: "16x16",
|
|
72
|
-
type: "images/png"
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
href: image_url("railsui/meta/android-chrome-192x192.png"),
|
|
76
|
-
sizes: '192x192',
|
|
77
|
-
type: "image/png"
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
href: image_url("railsui/meta/android-chrome-512x512.png"),
|
|
81
|
-
sizes: '512x512',
|
|
82
|
-
type: "image/png"
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
href: image_url("railsui/meta/apple-touch-icon.png"),
|
|
86
|
-
sizes: '180x180',
|
|
87
|
-
type: "image/png"
|
|
88
|
-
}
|
|
89
|
-
])
|
|
90
|
-
%>
|
|
45
|
+
description: "CHANGE ME"
|
|
46
|
+
) %>
|
data/lib/generators/railsui/install/templates/themes/shepherd/views/layouts/rui/railsui.html.erb
CHANGED
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
|
-
<title>
|
|
5
|
-
<%= Railsui.config.application_name || "Rails UI" %>
|
|
6
|
-
</title>
|
|
7
|
-
<meta charset="UTF-8" />
|
|
8
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
9
|
-
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
10
|
-
<meta name="mobile-web-app-capable" content="yes">
|
|
11
4
|
<%= csrf_meta_tags %>
|
|
12
5
|
<%= csp_meta_tag %>
|
|
13
6
|
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
|
-
<title>
|
|
5
|
-
<%= Railsui.config.application_name || "Rails UI" %>
|
|
6
|
-
</title>
|
|
7
|
-
<meta charset="UTF-8" />
|
|
8
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
9
|
-
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
10
|
-
<meta name="mobile-web-app-capable" content="yes">
|
|
11
4
|
<%= csrf_meta_tags %>
|
|
12
5
|
<%= csp_meta_tag %>
|
|
13
6
|
|
data/lib/generators/railsui/install/templates/themes/shepherd/views/rui/shared/_meta.html.erb
CHANGED
|
@@ -1,90 +1,46 @@
|
|
|
1
1
|
<%#
|
|
2
|
+
Meta tags for SEO and social sharing.
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
This uses Rails UI's built-in railsui_meta_tags helper which outputs:
|
|
5
|
+
- Title tag
|
|
6
|
+
- Viewport meta tag
|
|
7
|
+
- Description meta tag
|
|
8
|
+
- Canonical URL
|
|
9
|
+
- Open Graph tags (title, type, url, image, description, site_name)
|
|
10
|
+
- Social card tags (card, title, description, image)
|
|
11
|
+
- Favicon links
|
|
4
12
|
|
|
5
|
-
|
|
13
|
+
Basic Usage:
|
|
6
14
|
|
|
7
|
-
|
|
15
|
+
railsui_meta_tags
|
|
8
16
|
|
|
9
|
-
|
|
10
|
-
https://redketchup.io/favicon-generator (generate from an image)
|
|
17
|
+
Customizing per-page:
|
|
11
18
|
|
|
12
|
-
|
|
19
|
+
railsui_meta_tags(
|
|
20
|
+
title: "About Us",
|
|
21
|
+
description: "Learn more about our company."
|
|
22
|
+
)
|
|
13
23
|
|
|
14
|
-
|
|
15
|
-
https://figma.com
|
|
24
|
+
All available options:
|
|
16
25
|
|
|
17
|
-
|
|
18
|
-
|
|
26
|
+
railsui_meta_tags(
|
|
27
|
+
site: "My App",
|
|
28
|
+
title: "Page Title",
|
|
29
|
+
description: "Page description",
|
|
30
|
+
image: "meta/opengraph.jpg",
|
|
31
|
+
card_image: "meta/card.jpg",
|
|
32
|
+
og_type: "website",
|
|
33
|
+
card_type: "summary"
|
|
34
|
+
)
|
|
19
35
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
Title:
|
|
24
|
-
Change the title and description tags below to match your own site. The title displays alongside your site name in a given browser tab next to the favicon.
|
|
25
|
-
|
|
26
|
-
Description:
|
|
27
|
-
The description is a good place for one to two sentences describing a page OR what the site is all about. You can tweak this on a per-page basis inside your views or controllers. See the metatags gem documentation on tips for doing so: https://github.com/kpumuk/meta-tags#mirrored-values
|
|
36
|
+
Previewing: https://www.opengraph.xyz/
|
|
37
|
+
Generate icons: https://redketchup.io/favicon-generator
|
|
28
38
|
|
|
29
39
|
Images:
|
|
30
|
-
Swap your own images for placeholder ones inside the "assets/images/meta" folder
|
|
40
|
+
Swap your own images for placeholder ones inside the "assets/images/railsui/meta" folder.
|
|
31
41
|
%>
|
|
32
42
|
|
|
33
|
-
<%=
|
|
34
|
-
site: "#{Railsui.config.application_name.parameterize}.com", # <!-- change -->,
|
|
35
|
-
reverse: true,
|
|
36
|
-
viewport: "width=device-width, initial-scale=1",
|
|
43
|
+
<%= railsui_meta_tags(
|
|
37
44
|
title: "CHANGE ME",
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
title: Railsui.config.application_name,
|
|
41
|
-
type: "website",
|
|
42
|
-
url: request.original_url,
|
|
43
|
-
image: [{
|
|
44
|
-
_: image_url("railsui/meta/opengraph.jpg"),
|
|
45
|
-
width: 1200,
|
|
46
|
-
height: 630
|
|
47
|
-
}],
|
|
48
|
-
site_name: "#{Railsui.config.application_name.parameterize}.com", # <!-- change -->
|
|
49
|
-
description: "CHANGE ME",
|
|
50
|
-
},
|
|
51
|
-
twitter: {
|
|
52
|
-
title: :title,
|
|
53
|
-
description: :description,
|
|
54
|
-
card: "summary",
|
|
55
|
-
image: {
|
|
56
|
-
_: image_url("railsui/meta/opengraph-mark.jpg"),
|
|
57
|
-
width: 400,
|
|
58
|
-
height: 400,
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
author: Railsui.config.application_name,
|
|
62
|
-
description: "CHANGE ME",
|
|
63
|
-
icon: [
|
|
64
|
-
{
|
|
65
|
-
href: image_url("railsui/meta/favicon.svg"),
|
|
66
|
-
sizes: 'any',
|
|
67
|
-
type: "image/svg+xml"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
href: image_url("railsui/meta/favicon-16x16.png"),
|
|
71
|
-
sizes: "16x16",
|
|
72
|
-
type: "images/png"
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
href: image_url("railsui/meta/android-chrome-192x192.png"),
|
|
76
|
-
sizes: '192x192',
|
|
77
|
-
type: "image/png"
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
href: image_url("railsui/meta/android-chrome-512x512.png"),
|
|
81
|
-
sizes: '512x512',
|
|
82
|
-
type: "image/png"
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
href: image_url("railsui/meta/apple-touch-icon.png"),
|
|
86
|
-
sizes: '180x180',
|
|
87
|
-
type: "image/png"
|
|
88
|
-
}
|
|
89
|
-
])
|
|
90
|
-
%>
|
|
45
|
+
description: "CHANGE ME"
|
|
46
|
+
) %>
|
data/lib/railsui/engine.rb
CHANGED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Railsui
|
|
4
|
+
module MetaTagsHelper
|
|
5
|
+
def railsui_meta_tags(options = {})
|
|
6
|
+
defaults = {
|
|
7
|
+
site: Railsui.config.application_name,
|
|
8
|
+
title: nil,
|
|
9
|
+
description: nil,
|
|
10
|
+
image: "railsui/meta/opengraph.jpg",
|
|
11
|
+
card_image: "railsui/meta/opengraph-mark.jpg",
|
|
12
|
+
og_type: "website",
|
|
13
|
+
card_type: "summary"
|
|
14
|
+
}
|
|
15
|
+
opts = defaults.merge(options)
|
|
16
|
+
|
|
17
|
+
full_title = [opts[:title], opts[:site]].compact.join(" | ")
|
|
18
|
+
og_image_url = opts[:image]&.start_with?("http") ? opts[:image] : image_url(opts[:image])
|
|
19
|
+
card_image_url = opts[:card_image]&.start_with?("http") ? opts[:card_image] : image_url(opts[:card_image])
|
|
20
|
+
|
|
21
|
+
safe_join([
|
|
22
|
+
tag.meta(charset: "UTF-8"),
|
|
23
|
+
tag.title(full_title),
|
|
24
|
+
tag.meta(name: "viewport", content: "width=device-width, initial-scale=1"),
|
|
25
|
+
tag.meta(name: "apple-mobile-web-app-capable", content: "yes"),
|
|
26
|
+
tag.meta(name: "mobile-web-app-capable", content: "yes"),
|
|
27
|
+
tag.meta(name: "description", content: opts[:description]),
|
|
28
|
+
tag.link(rel: "canonical", href: request.original_url),
|
|
29
|
+
# Open Graph
|
|
30
|
+
tag.meta(property: "og:title", content: full_title),
|
|
31
|
+
tag.meta(property: "og:type", content: opts[:og_type]),
|
|
32
|
+
tag.meta(property: "og:url", content: request.original_url),
|
|
33
|
+
tag.meta(property: "og:image", content: og_image_url),
|
|
34
|
+
tag.meta(property: "og:description", content: opts[:description]),
|
|
35
|
+
tag.meta(property: "og:site_name", content: opts[:site]),
|
|
36
|
+
# Social Card (X/Twitter)
|
|
37
|
+
tag.meta(name: "twitter:card", content: opts[:card_type]),
|
|
38
|
+
tag.meta(name: "twitter:title", content: full_title),
|
|
39
|
+
tag.meta(name: "twitter:description", content: opts[:description]),
|
|
40
|
+
tag.meta(name: "twitter:image", content: card_image_url),
|
|
41
|
+
# Favicons
|
|
42
|
+
tag.link(rel: "icon", href: image_url("railsui/meta/favicon.svg"), type: "image/svg+xml"),
|
|
43
|
+
tag.link(rel: "apple-touch-icon", href: image_url("railsui/meta/apple-touch-icon.png"))
|
|
44
|
+
].compact, "\n")
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
data/lib/railsui/version.rb
CHANGED
data/lib/railsui.rb
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
require "railsui/version"
|
|
4
4
|
require "railsui/engine"
|
|
5
5
|
require "railsui_icon"
|
|
6
|
-
require "meta-tags"
|
|
7
6
|
require "tailwindcss-rails"
|
|
8
7
|
|
|
9
8
|
module Railsui
|
|
@@ -11,6 +10,7 @@ module Railsui
|
|
|
11
10
|
autoload :Pages, "railsui/pages"
|
|
12
11
|
autoload :Themes, "railsui/themes"
|
|
13
12
|
autoload :ThemeHelper, "railsui/theme_helper"
|
|
13
|
+
autoload :MetaTagsHelper, "railsui/meta_tags_helper"
|
|
14
14
|
autoload :ThemeSetup, "railsui/theme_setup"
|
|
15
15
|
autoload :FormBuilder, "railsui/form_builder"
|
|
16
16
|
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: railsui
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andy Leverenz
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2026-
|
|
10
|
+
date: 2026-02-09 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: rails
|
|
@@ -37,20 +37,6 @@ dependencies:
|
|
|
37
37
|
- - ">="
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
39
|
version: '0'
|
|
40
|
-
- !ruby/object:Gem::Dependency
|
|
41
|
-
name: meta-tags
|
|
42
|
-
requirement: !ruby/object:Gem::Requirement
|
|
43
|
-
requirements:
|
|
44
|
-
- - ">="
|
|
45
|
-
- !ruby/object:Gem::Version
|
|
46
|
-
version: '0'
|
|
47
|
-
type: :runtime
|
|
48
|
-
prerelease: false
|
|
49
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
50
|
-
requirements:
|
|
51
|
-
- - ">="
|
|
52
|
-
- !ruby/object:Gem::Version
|
|
53
|
-
version: '0'
|
|
54
40
|
- !ruby/object:Gem::Dependency
|
|
55
41
|
name: railsui_icon
|
|
56
42
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -1783,6 +1769,7 @@ files:
|
|
|
1783
1769
|
- lib/railsui/configuration.rb
|
|
1784
1770
|
- lib/railsui/engine.rb
|
|
1785
1771
|
- lib/railsui/form_builder.rb
|
|
1772
|
+
- lib/railsui/meta_tags_helper.rb
|
|
1786
1773
|
- lib/railsui/pages.rb
|
|
1787
1774
|
- lib/railsui/theme_helper.rb
|
|
1788
1775
|
- lib/railsui/theme_setup.rb
|