Code Monkey home page Code Monkey logo

seotamic's Introduction

Seotamic - Statamic SEO Addon

Statmic v3 only. Automatically adds a SEO tab to all your collection entries where you can fine tune SEO for every entry.

{{ seotamic }}

Generates the whole array of SEO settings:

<title>My Page Title</title>
<meta name="description" content="SEO friendly description" />
<link rel="canonical" href="https://mysite.com/page" />
<meta property="og:url" content="https://mysite.com/page" />
<meta property="og:site_name" content="Site name" />
<meta property="og:title" content="My Page Title" />
<meta property="og:description" content="SEO friendly description" />
<meta property="og:locale" content="en_US" />
<meta property="og:image" content="https://mysite.com/img/og.jpg" />
...

Version 2 changes

Version 2 has breaking changes. If you update from version 1, your global settings will not be transfered, you need to manually copy the old files to the content directory.

Installation

Include the package with composer:

composer require cnj/seotamic

The package requires Laravel 7+ and PHP 7.3+. It will auto register.

The SEO section tab will appear on all collection entries automatically.

Configuration (optional)

You can override the default options by publishing the configuration:

php artisan vendor:publish --provider="Cnj\Seotamic\ServiceProvider" --tag=config

This will copy the default config file to `config/seotamic.php'.

If you need to change the default assets container, make sure to apply the change in the Blueprints as well.

Usage

Usage is fairly simple and straight forward. You can visit the global Settings by following the Seotamic link on the navigation in the CP. Make sure to follow the instructions on each field.

After this you can fine tune the output of each collection entry by editing the SEO settings under the entry's SEO tab.

Antlers

There are several antler tags available, the easiest is to just include the do everything base tag in the head of your layout:

{{ seotamic }}

If you need more control you can manually get each part of the output by using:

{{ seotamic:title }}
{{ seotamic:description }}
{{ seotamic:canonical }}

This will return strings, so you need to wrap them in the appropriate tags, ie:

<title>{{ seotamic:title }}</title>

Social ones will still return everything with tags

{{ seotamic:og }}
{{ seotamic:twitter }}

Credits

This package was built by CNJ Digital.

License

This project is licensed under the MIT License.

seotamic's People

Contributors

martink635 avatar jmartsch avatar ryanmitchell avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.