a ruby gem to manage your landing pages in Rails easily
Joaquin Rivera Padron
#hackweekxing
SEO: 3 key HTML elements in the <head>
github.com/joahking/seo-landing-pages
#hackweekxing
This gem lets you easily:
github.com/joahking/seo-landing-pages
#hackweekxing
# in your Gemfile
gem 'seo_landing_pages'
$ bundle
github.com/joahking/seo-landing-pages
#hackweekxing
$ rails g seo_landing_pages setup
create db/migrate/20151002132829_create_seo_landing_pages.rb
insert app/controllers/application_controller.rb
create app/admin/seo_landing_pages.rb
create config/locales/seo_landing_pages.en.yml
create config/locales/seo_landing_pages.es.yml
github.com/joahking/seo-landing-pages
#hackweekxing
a Rails generator is provided
class CreateSeoLandingPages < ActiveRecord::Migration
def change
create_table :seo_landing_pages do |t|
t.string :slug
t.string :title
t.string :description
t.string :keywords
t.timestamps
end
add_index :seo_landing_pages, :slug
end
end
github.com/joahking/seo-landing-pages
#hackweekxing
class ApplicationController < ActionController::Base
+ include SeoLandingPages::Controllers::Helpers
+
A method to find the landing by request path
Some helpers for your views (more on it later)
github.com/joahking/seo-landing-pages
#hackweekxing
github.com/joahking/seo-landing-pages
#hackweekxing
SeoLandingPages::Model.create! slug: '/',
title: 'SEO landings FTW'
github.com/joahking/seo-landing-pages
#hackweekxing
# in the head section
= seo_landing_page_title_tag
= seo_landing_page_description_tag
= seo_landing_page_keywords_tag
create the HTML tags when
github.com/joahking/seo-landing-pages
#hackweekxing
# in the head section
= seo_landing_page_title_tag i18n: true
= seo_landing_page_description_tag i18n: true
= seo_landing_page_keywords_tag i18n: true
github.com/joahking/seo-landing-pages
#hackweekxing
SeoLandingPages::Model.create! slug: '/',
title: 'an_i18n_key'
create landings with i18n keys
use helpers with i18n support
translate an_i18n_key in your locales
github.com/joahking/seo-landing-pages
#hackweekxing
github.com/joahking/seo-landing-pages
https://rubygems.org/gems/seo_landing_pages
github.com/joahking/seo-landing-pages
#hackweekxing
github.com/joahking/seo-landing-pages
#hackweekxing
SEO Landing Pages
Joaquin Rivera Padron