alchemy_cms
https://github.com/magiclabs/alchemy_cms
Ruby
AlchemyCMS is a powerful, flexible and user centric Rails 5 CMS. 🧙🏻♂️
Alchemy::PagesHelper#render_meta_data
This helper takes care of all important meta tags for your page.
The meta data is been taken from the @page.title, @page.meta_description, @page.meta_keywords, @page.updated_at and @page.language database entries managed by the Alchemy user via the Alchemy cockpit.
Assume that the user has entered following data into the Alchemy cockpit of the Page "home" and that the user wants that the searchengine (aka. google) robot should index the page and should follow all links on this page:
Title = Homepage
Description = Your page description
Keywords: cms, ruby, rubyonrails, rails, software, development, html, javascript, ajax
Then placing +render_meta_data(title_prefix: "Company", title_separator: "-")+ into the <head> part of the +pages.html.erb+ layout produces:
<meta charset="utf-8">
<title>Company - #{@page.title}</title>
<meta name="description" content="Your page description">
<meta name="keywords" content="cms, ruby, rubyonrails, rails, software, development, html, javascript, ajax">
<meta name="created" content="Tue Dec 16 10:21:26 +0100 2008">
<meta name="robots" content="index, follow">Edit
git clone [email protected]:magiclabs/alchemy_cms.git
cd alchemy_cms
open app/helpers/alchemy/pages_helper.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Alchemy--PagesHelper-render_meta_data-for-pr
# Commit to gitgit add app/helpers/alchemy/pages_helper.rbgit commit -m "better docs for Alchemy::PagesHelper#render_meta_data"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Alchemy--PagesHelper-render_meta_data-for-pr
hub pull-request
# Celebrate!