⚡
LightningRails
  • 👋Welcome
  • Access the Repo
  • Getting Started
    • 🚀Quickstart
    • 🎨Themes
    • 🖼️Customize the views
    • 🔮DaisyUI Library
    • ⚡Lightning Landing
      • Quickstart
      • Theme and branding
      • Page structure
      • Publish your landing page
  • Features setup
    • 📸Images & media
    • 🔐Admin Dashboard
    • Search Engine Optimization
    • 📧Automatic Emails
      • 🟨Postmark
      • 🔲Resend
    • 🚪Login with Devise
    • 🪄Magic Link Signup
    • 💳Stripe Payment Gateway
    • Github Signup
    • Lucide icons
    • 🤖Multi-provider AI
    • Open AI API
  • UI Components
    • 🦸Heros
    • ❔FAQs
    • 🃏cards
    • 💬Testimonials
    • 👋Call To Actions
    • 🔦Features
  • Deploying to production
    • ⬆️Heroku Deploy
    • 🛡️Security
      • 🎛️Rate Limiting
  • RESOURCES
    • 🚀Vote for new features
    • Report an issue
    • 🆘Get help on Slack
    • 🍭Design Resources
      • Maria Ba Illustrations
      • Assets Mockup Generator
      • Logo Generator
      • Tailwind Cheatsheet
      • HyperUI Tailwind Library
Powered by GitBook
On this page
  • Basic Setup
  • How to rank on Google

Was this helpful?

  1. Features setup

Search Engine Optimization

Easily setup your app to rank high on google with search engine optimisation (SEO)

Basic Setup

LightningRails comes with a default SEO setup loaded in the initializers. To rank on your ideal keywords, visit the meta.yml file and modify the values:

# meta.yml
meta_product_name: "LightningRails"
meta_title: "LightningRails - The fastest way to kickstart your Rails app"
meta_description: "LightningRails is a Rails template that helps you kickstart your Rails app in minutes. It comes with a set of pre-configured tools and best practices to help you build your app faster."
meta_image: "cover.png" # should be in `app/assets/images/`
twitter_account: "@product_twitter_account"

These values will appear on every page by default, this is a great start but not ideal. We recommend leaving the default values on your homepage and overriding the variable manually on all the other pages with the following lines:

# Modify content to adapt to each page, for example with pricing.html.erb
<% content_for :meta_title, "No trick pricing on #{DEFAULT_META["meta_product_name"]}" %>
<% content_for :meta_description, "Get more for less, access our pro membership to build rails apps in seconds" %>
<% content_for :meta_image, "cover.png" %>

<h1>Pricing</h1>
[...]

Pro Tip: For show pages, add instance variables in the meta tags to have them tailored to each instance page. For example, if you have a car shop, interpolate "@car.name" in the meta_title so you start ranking with all the different car brand keywords with just one line! 🏎️

How to rank on Google

Pro Tip: Don't forget to add "skip_before_action :authenticate_user" to all the actions you wish to rank for. If the page is hidden behind an authentication wall google won't be able to access it and won't index it.

PreviousAdmin DashboardNextAutomatic Emails

Last updated 8 months ago

Was this helpful?

To start ranking on Google, and submit the new links you wish to rank for. Make sure to link pages between each other for Google spiders to be able to crawl more effectively across your site, if done right, you will send traffic from some of your pages towards the main ones, the ones that transform and make money, it is called a Keyword tree 🌳

create a search console account