Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SEO tool #51

Closed
irmob opened this issue May 4, 2013 · 9 comments
Closed

SEO tool #51

irmob opened this issue May 4, 2013 · 9 comments

Comments

@irmob
Copy link

irmob commented May 4, 2013

Please add SEO tools for use Pi Engine modules.

@taiwen
Copy link
Member

taiwen commented May 5, 2013

What kind of tools do we need to implement in Pi?

@voltan
Copy link
Member

voltan commented May 5, 2013

For SEO, I think some options like this needed, I will looking for , for more options.
Before that, Please check this this short SEO review : http://www.woorank.com/en/www/payamakyab.com

Social Networks

We need more options for link to Social Networks, each website should create a accounts and some options in PI for use it. more info here : http://blog.woorank.com/2012/12/social-media-optimization-tips-for-local-seo/

Mobile Optimization

This is a theme option. And some tools in theme needed , More info : http://www.smashingmagazine.com/guidelines-for-mobile-web-development/

Mobile Load Time and Mobile Rendering are important too.

robots.txt

It needed option, but we must customize it for each website
More info : http://blog.woorank.com/2013/04/robots-txt-a-beginners-guide/
tool.motoricerca.info/robots-checker.phtml

XML Sitemap

This option is very important, I think we need module for manage it and perhaps , some kernel service for use on other module. I should update automatically

Page title , meta description and Keywords

Now , we have all needed option for set title , meta description and Keywords , But we need more option for make / manage it :

Headings

Again theme and template option. We must have just one h1 tag in each page and fore h2 and ... This is very important option

Images

All images ( img tag ) should have alt, in theme and templates

Print-Friendly CSS

It goog if we have Print-Friendly CSS in theme

META Language Attribute

Set META Language Attribute in header : www.w3schools.com/tags/tag_meta.asp

Microformats And Dublin Core

en.wikipedia.org/wiki/Microformat
en.wikipedia.org/wiki/Dublin_Core

W3C Validity

Its very important, all themes and templates should check for validation

Just 4 CSS

In each page ( home page is important ) we must load just 4 css. Its not easy :D

gzip

Need option for each website

@irmob
Copy link
Author

irmob commented May 5, 2013

Just voltan say, SEO is very important.
In my experience I see the smartsection module on xoops have very good SEO and google find article very fast on this module.
Also wordpress have good SEO for images and joomla have good SEO for article URL
We can see the structure of old systems and see which theme have good performance.

@Marc-pi
Copy link
Member

Marc-pi commented May 5, 2013

yes, i tested few days ago the woorank tool with http://www.woorank.com/en/www/pi-engine.org
previously metagen class was invented for xoops, i don't know if it's still worth to have it??

@taiwen
Copy link
Member

taiwen commented May 5, 2013

Wow! So much valuable information. I need go through the tips and implement properly.

@voltan
Copy link
Member

voltan commented May 5, 2013

Thanks, Just let me time for improve this list. I should ask some one for more needed option. I'll finish it tomorrow

@Marc-pi
Copy link
Member

Marc-pi commented May 5, 2013

it seems the first weaknesses to solve :
keywords generation
langage detection
xml sitemap feature
microformat and dublin core

for pi-engin website
improve site description
update regularly the blog / news entries
add print friendly css
improve back-links

use http://www.google.com/webmasters/ tools for SEO for more

@voltan
Copy link
Member

voltan commented May 6, 2013

I asked / search about SEO tools, I think each website need two part of options and tools, some system options and some options should added by webmaster after setup website.

System options

this option is two parts, theme/template options and kernel /module options ( categorize based by PI system )

theme/template options

Mobile Optimization

More info : http://www.smashingmagazine.com/guidelines-for-mobile-web-development/

Headings

Each theme need h1... h6 tag : one h1 tag, four h2 tags ...

Images

All images ( img tag ) should have alt, in theme and templates

Print-Friendly CSS

It goog if we have Print-Friendly CSS in theme

W3C Validity

Its very important, all themes and templates should check for validation

Just 4 CSS

In each page ( home page is important ) we must load just 4 css. Its not easy :D and less important.

back-links

kernel /module

robots.txt

It needed option, but we must customize it for each website. More info : http://blog.woorank.com/2013/04/robots-txt-a-beginners-guide/

XML Sitemap

This option is very important, I think we need module for manage it and perhaps , some kernel service for use on other module. I should update automatically and manually, and name file must be sitemap.xml in website root.

META Language Attribute

Set META Language Attribute in header : www.w3schools.com/tags/tag_meta.asp
have to load whit $this->assemble('headMeta', 4);

Microformats And Dublin Core

en.wikipedia.org/wiki/Microformat
en.wikipedia.org/wiki/Dublin_Core
is good if load whit $this->assemble('Microformat', 4); And $this->assemble('DublinCore', 4); and we need setting options for set all pther metas DublinCore Microformat

URL system

it important each website have clean url.Now PI use true standard for URL. Just we need function for set slug/alis and check it unique or not

Blog

Blog system is two important. we will have news / article / page and other content manager modules. But each website should have blog link http://pi-engine.org/blog . ites very important but we should find solution for use other modules or one category of other modules as blog whit direct link

Page title , meta description and Keywords

Now , we have all needed option for set title , meta description and Keywords , But we need more option for generate it :

we need standard we how to generate title , meta description and Keywords, for all modules. generate it when submit each item and save clean data in module->item->db and just load for view. or generate it when each page called. which one?

In my modules, I generate meta in submit process and save in DB. I use this example codes :

namespace Pi\Mvc\Controller\Plugin;

use Zend\Mvc\Controller\Plugin\AbstractPlugin;

class Meta extends AbstractPlugin
{ 
    public $_search = array(" ","\t","\r\n","\r","\n",",",".","'",";",":",")",
                            "(",'"','?','!','{','}','[',']','<','>','/','+','-','_',
                            '\\','*','=','@','#','$','%','^','&');
   public $_replace = array(' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
                            ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',
                            ' ',' ',' ',' ',' ','');

   /*
     * $this->meta()->keywords($keywords);
     * $this->meta()->keywords($keywords, $number, $limit);
     */
    public function keywords($keywords, $number = '6', $limit = '3') 
    {
        $keywords = strip_tags($keywords);
        $keywords = strtolower($keywords);
        $keywords = htmlentities($keywords, ENT_COMPAT, 'utf-8');
        $keywords = preg_replace('`\[.*\]`U', '', $keywords);
        $keywords = preg_replace('`&(amp;)?#?[a-z0-9]+;`i', '', $keywords);
        $keywords = preg_replace('`&([a-z])(acute|uml|circ|grave|ring|cedil|slash|tilde|caron|lig);`i', '\\1', $keywords);
        $keywords = str_replace($this->_search, $this->_replace, $keywords);
        $keywords = explode(' ',$keywords);
        $keywords = array_unique($keywords);
      foreach($keywords as $keyword) {
            if(mb_strlen($keyword) >= $limit && !empty($keyword) && !is_numeric($keyword)) {
                $key[] = $keyword;
            }
        }
        $key = array_slice($key, 0, $number);
      $keywords = implode(',',$key);
      $keywords = trim($keywords, ',');
        return $keywords;
    }   

   /*
     * $this->meta()->description($description);
     */
    public function description($description) 
    {
        $description = strip_tags($description);
        $description = strtolower($description);
        $description = htmlentities($description, ENT_COMPAT, 'utf-8');
        $description = preg_replace('`\[.*\]`U', '', $description);
        $description = preg_replace('`&(amp;)?#?[a-z0-9]+;`i', '-', $description);
        $description = preg_replace('`&([a-z])(acute|uml|circ|grave|ring|cedil|slash|tilde|caron|lig);`i', '\\1', $description);
        $description = str_replace($this->_search, $this->_replace, $description);
        return $description;
    }   
}

@Marc-pi
Copy link
Member

Marc-pi commented Jan 27, 2015

close as done

@Marc-pi Marc-pi closed this as completed Jan 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants