Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
So Meta is a gem to simply manage meta content (title, description, canonical url, etc.) from within a Rails application
Add this line to your application's Gemfile:
gem 'so_meta'
And then execute:
$ bundle
Or install it yourself as:
$ gem install so_meta
So Meta uses the localization file to provide easy to modify SEO text content for page titles, descriptions and other text content for layouts and views.
# config/locales/en.yml
en:
so_meta:
defaults:
title: "My Awesome New Rails Application"
description: "This application will be so viral, your startup
friends will be JEALOUS!"
pages: # Controller name - PagesController
about: # Action name - about
title: "About | My Awesome New Rails Application"
description: "Our company will blow your mind...like really."
pages_subresource: # Controller name - Pages::SubresourceController
about: # Action name - about
title: "About | My Awesome New Rails Application"
description: "Our company will blow your mind...like really."
contact:
title: "Contact %{name} | My Awesome New Rails Application" # Interpolation content from the view
# By not specifying a description for this page, it'll inherit the defaults
<!-- views/layouts/application.html.erb -->
<!DOCTYPE html>
<html lang="en">
<head>
<title><%= so_meta(:title) %></title>
<meta name="description" content="<%= so_meta(:description) %>" />
<%= csrf_meta_tags %>
</head>
<body>
</body>
</html>
<!-- app/views/pages/contact.html.erb -->
<% so_meta_interpolation :title, name: "Brandon" %>
<h1>Contact</h1>
<p>Contact us now!</p>
<title><%= so_meta(:title, :phone) %></title>
# config/locales/en.yml
en:
so_meta:
defaults:
title: "My Awesome New Rails Application"
description: "This application will be so viral, your startup
friends will be JEALOUS!"
pages: # Controller name - PagesController
about: # Action name - about
title: "About | My Awesome New Rails Application"
description: "Our company will blow your mind...like really."
phone:
title: "Specific title for phone" # will choose this if the scope
matches
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that so_meta demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.