Giter Site home page Giter Site logo

cyber-duck / silverstripe-seo Goto Github PK

View Code? Open in Web Editor NEW
44.0 6.0 39.0 843 KB

A SilverStripe module to optimise the Meta, crawling, indexing, and sharing of your website content

License: MIT License

PHP 87.37% JavaScript 2.89% Scheme 6.99% SCSS 2.75%
silverstripe-seo silverstripe meta sitemap seo seo-optimization silverstripe-4

silverstripe-seo's Introduction

SilverStripe 4 SEO

Latest Stable Version Latest Unstable Version Total Downloads License

Author: Andrew Mc Cormack

Features

A SilverStripe module to enhance and optimize your website SEO.

  • SEO Extension for Pages and DataObjects
  • Meta Title, Description, Twitter, Facebook (OG Graph), Canonical, Robots, Social Image Meta
  • Ability to add other Meta tags
  • Pagination Meta tags for page sets
  • Dynamic Meta generation from Model properties
  • Auto generated Blog Post schema
  • Free text field for Page schema
  • CMS Google SERP Meta preview
  • SEO CMS Admin area
  • SEO CMS Settings configuration
  • Robots.txt controller and auto generation
  • XML Sitemap controller and auto generation
  • Ability to attach images to XML Sitemap pages
  • Nested HTML Sitemap generator
  • Blog module SEO extension

Installations

SilverStripe 4.0 and 4.1 and over require different versions of this module because of the different public folder structure. Please see the following 2 methods.

SilverStripe 4.1 installation

Add the following to your composer.json file and run /dev/build?flush=all

{  
    "require": {  
        "cyber-duck/silverstripe-seo": "4.2.*"
    }
}

SilverStripe 4.0 installation

Add the following to your composer.json file and run /dev/build?flush=all

{  
    "require": {  
        "cyber-duck/silverstripe-seo": "4.1.*"
    }
}

Setup

Todo

  • Automap Sitemap Priority

silverstripe-seo's People

Contributors

christopherdarling avatar claire-cyber-duck avatar derkgort avatar gordonbanderson avatar labcat avatar lars-lemon8 avatar lpostiglione avatar michalkleiner avatar ramono avatar renskorswagen avatar rodwin avatar samthejarvis avatar sebastiand avatar waiyanheincyberduck avatar wilr avatar worzy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

silverstripe-seo's Issues

Static Publisher problem with meta-tags

Hi,

I'm experiencing problems with Static Publisher in conjunction with the SEO module.

It seems meta-tags the SEO module sets, do not get updated when statically publishing a queue. (all pages get the same meta-tags than the first page in the queue) ..

I've been digging around , but can't seem to find the issue , could be something in the static-publisher as wel. Wondering whether you run the SEO module in conjunction with the static publisher as well or have any idea where to look .....

thnks,
lars

Sitemap changefreq doesn't seem to be valid

I was looking at the sitemap generated by the module, but after a quick google search I'm thinking that there is something odd to it. Specifically in this part:

<url>
  ...
  <changefreq/>
  ...
</url>

Shouldn't this be:

<url>
  ...
  <changefreq>[value]</changefreq>
  ...
</url>

I took a look in the code, but for some reason the defaults are ignored just for the ChangeFrequency field, the other defaults seem to work okay...

Call to undefined method SilverStripe\Config\Collections\CachedConfigCollection::remove()

The same error that was already reported in #19 occurs again starting from version 4.4.0+.

It was fixed via commit 3217646 (pull request 24).

The bug was then re-introduced via commit cd53f5a where the buggy line Config::inst()->remove($this->owner->class, 'summary_fields'); in SeoPageExtension.php was added again.

I have created a modified fix:
I added a check if the method remove() exists in the owner class, before calling it - inssead of removing the the line altogether.

I will add a pull request towards the develop branch for this, and hope it will be relaesed as a new bugfix version 4.5.2 soon.

SEOAdmin - OGLocale incorrectly shows as Locale of logged in user

Website Locale: en_GB
Admin user Locale: en_US

Page record has no OGLocale value set so falls back on i18n::get_locale() which picks up the logged in users locale (en_US) rather than the default that the site will be running in on the frontend for visitors.

alternate languages in sitemap.xml

It would be nice is alternate hreflang could be added to the sitemap .... like this...
`

  | https://mebes.be/nieuws/eerste-nieuwsbericht/
  |  
  | 2022-06-27T11:17:00+02:00
  |  
  | weekly
  |  
  | 0.9
  |  
  |  
  | <xhtml:link
  | rel="alternate"
  | hreflang="en-us"
  | href="https://mebes.be/en/"
  | />
  |  
  | <xhtml:link
  | rel="alternate"
  | hreflang="fr-be"
  | href="https://mebes.be/fr/nouvelles/launch-nouvelle-site-web-mebes/"
  | />
  |  
  | <xhtml:link
  | rel="alternate"
  | hreflang="nl-be"
  | href="https://mebes.be/nieuws/eerste-nieuwsbericht/"
  | />
  |  
  |  
  |

`

BUG Blogs - link[rel="next"] doesn't respect category

Install SilverStripe Blog
Create a few blog posts
Create a category, with enough posts in to trigger pagination
Browse on the frontend /blog/category-slug/ look at page source and you'll see the tag <link rel="next" href="/blog/?start=12"> instead of ... href="/blog/category-slug/?start=12"

Down to SeoPageExtension::getPaginationNextTag() using getPageURL() which uses the Controller Link method.

cms.yml - resources/cyber-duck/silverstripe-seo/assets/css/seo.css needs to changing to vendor/cyber-duck/silverstripe-seo/assets/css/seo.css

Hey,

I thought I would inform you that I am getting a nasty error with the drop from dev-master when using this extension with SilverStripe 4.1.1. It says that it can't find the file from resources/cyber-duck/silverstripe-seo, but when I cahnge it to "vendor" instead, it can locate the relative path fine.

Before:

`---
Name: seo cms config

SilverStripe\Admin\LeftAndMain:
extra_requirements_css:
- resources/cyber-duck/silverstripe-seo/assets/css/seo.css`

After:

`---
Name: seo cms config

SilverStripe\Admin\LeftAndMain:
extra_requirements_css:
- vendor/cyber-duck/silverstripe-seo/assets/css/seo.css`

Fatal Error when going to mydomain.com/sitemap.xml

Hi,

Im getting the following error when going to view the sitemap mydomain.com/sitemap.xml

PHP Fatal error: Call to a member function getSitemapXML() on null in httpdocs/seo/code/core/SEO.php on line 143

Thanks
Michael

Call to undefined method SilverStripe\Config\Collections\CachedConfigCollection::remove()

Just installed new stable version(4.1.0) of this module, having problem on SS 4.0.3 accessing /admin/seo-admin/. Error:

Emergency] Uncaught Error: Call to undefined method SilverStripe\Config\Collections\CachedConfigCollection::remove()
GET /admin/seo-admin/

Line 257 in /var/www/public/vendor/cyber-duck/silverstripe-seo/src/Model/Extension/SeoPageExtension.php

Path to seo.css not correct

When installing this module on newer SilverStripe versions I always get the following message:
[User Notice] File resources/vendor/cyber-duck/silverstripe-seo/assets/css/seo.css does not exist

For now I copied the seo.css file into the direction path from the warning resources/vendor/cyber-duck/silverstripe-seo/assets/css/ But it would be nice if the path can be autogenerated into a _resources folder.

error in webmaster tool

Hi,
I try this module and check the sitemap in google webmaster tool (search console) and show some error.
I check every tags in site map.xml
what's the problem?
screenshot 4

Database Error

I get this error on initial installation. I have done a dev/build?flush
Expression #1 of ORDER BY clause is not in SELECT list, references column 'lyniate.Page.Priority' which is not in SELECT list; this is incompatible with DISTINCT

image

Requirements issue when using Silverstripe 4.1 in combination with public directory

Hi,

Can't seem to find any docs on it, but the extra_requirements_css in CMS.yml does not seem to play nice with SS 4.1 i.c.w. the public folder.

Right now it reads :
resources/cyber-duck/silverstripe-seo/assets/css/seo.css

After exposing the assets to the public folder, the needed CSS file will be situated in
/public/resources/vendor/cyber-duck/silverstripe-seo/assets/css/seo.css

Other Meta Tags

Hi,
I try this module with fluent module but it's not working.
Also i add the configuration to my fluent yml config but it's showing an error.
my config:
Name: CyberDuck\SEO\Model\SeoHeadTag
CyberDuck\SEO\Model\SeoHeadTag: extensions: - 'TractorCow\Fluent\Extension\FluentExtension'

Error for pagination in blog

Hi,
When i try next page or page number in blog i see this error
screenshot 71
I changed the (CurrentPage() == 2) in these code (if($this->CurrentPage() == 2) { $url = $this->request->getURL(false);) in src\ORM\SeoPaginatedList.php into another number(e.g. CurrentPage() == 0 or CurrentPage() == 1000) then it's working fine

Index column size too large.

First of all i realy like your module, thank you. I just noticed that I can not make your module work unless i set ROW_FORMAT=COMPRESSED. I was just curious if you are aware of this?
I fix this by creating an extension that sets further MySQL configuration.

 private static $create_table_options = [
        'MySQLDatabase' => 'ENGINE=InnoDB ROW_FORMAT=COMPRESSED'
    ];

FYI
bildschirmfoto 2019-01-14 um 10 31 56

Module doesnt work

the meta tags are added in the <head> but i set up all sites and the content is empty in all meta tags i set up.

Canonical Link false for DataObjects

Hi, I created a dataobject for countries, having a list /countries and a country view /countries/albania
Also enabled the extension for the model. I get the additinal tabs in the backend.

Country:
  extensions:
    - CyberDuck\SEO\Model\Extension\SeoExtension

But the canonical meta tag does not change: It is example.tld/countries in either case. It should be example.tld/countries/albania in the country view (just like the address in the address bar of the browser). But it isn't.
Did I miss something?

Absolute URLs needed for OG tags

Thanks for your work on this module !

It seems the SEO module produces relative URL's for social images.

Is there any way to produce absolute URL's ?

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.