Download the PHP package octfx/wiki-seo without Composer

On this page you can find all versions of the php package octfx/wiki-seo. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package wiki-seo

MediaWiki WikiSEO extension

Starting from 2023-01-23, WikiSEO requires MediaWiki 1.39.0

The WikiSEO extension allows you to replace, append or prepend the html title tag content, and allows you to add common SEO meta keywords and a meta description.

Extension Page: Extension:WikiSEO

Installation

Configuration

The following variables are in use by this extension.

Variable Description Usage
Site / App Keys
$wgGoogleSiteVerificationKey Setting this variable will add a <meta name="google-site-verification" content="CODE"> tag to every page. $wgGoogleSiteVerificationKey = 'CODE';
$wgBingSiteVerificationKey Setting this variable will add a <meta name="msvalidate.01" content="CODE"> tag to every page. $wgBingSiteVerificationKey= 'CODE';
$wgFacebookAppID Setting this variable will add a <meta property="fb:app_id" content="ID"> tag to every page. $wgFacebookAppID= 'App_ID';
$wgFacebookAdmins Setting this variable will add a <meta property="fb:admins" content="ID1,ID2,..."> tag to every page. $wgFacebookAdmins= 'ID1,ID2,...';
$wgYandexSiteVerificationKey Setting this variable will add a <meta name="yandex-verification" content="CODE"> tag to every page. $wgYandexSiteVerificationKey= 'CODE';
$wgPinterestSiteVerificationKey Setting this variable will add a <meta name="p:domain_verify" content="CODE"> tag to every page. $wgPinterestSiteVerificationKey= 'CODE';
$wgNortonSiteVerificationKey Setting this variable will add a <meta name="norton-safeweb-site-verification" content="CODE"> tag to every page. $wgNortonSiteVerificationKey= 'CODE';
$wgNaverSiteVerificationKey Setting this variable will add a <meta name="naver-site-verification" content="CODE"> tag to every page. $wgNaverSiteVerificationKey = 'CODE';
General Options
$wgMetadataGenerators Array containing the metadata generator classes to load. Custom generators can be added by appending the class name without the namespace to this array. $wgMetadataGenerators = ["OpenGraph", "Twitter", "SchemaOrg"]
$wgTwitterSiteHandle Only used when Twitter generator is loaded. Setting this variable will add a tag to every page. $wgTwitterSiteHandle = '@SITE_HANDLE';
$wgWikiSeoDefaultImage Set a default image to use if no image is set on the site. If this variable is not set the sites logo will be used. $wgWikiSeoDefaultImage = 'File:Localfile.jpg';
$wgTwitterCardType Defaults to summary_large_image for the twitter card type. $wgTwitterCardType = 'summary';
$wgWikiSeoDefaultLanguage A default language code with area to generate a for. $wgWikiSeoDefaultLanguage = 'de-de';
$wgWikiSeoDisableLogoFallbackImage Disables setting $wgLogo as the fallback image if no image was set.
$wgWikiSeoNoindexPageTitles An array of page titles where a 'noindex' robot tag should be added. $wgWikiSeoNoindexPageTitles = [ 'Custom_Title', 'Main_Page' ];
$wgWikiSeoEnableAutoDescription Set to true to try to request a description from textextracts, if no description was given, or the description key is set to 'textextracts' or 'auto'. This requires Extension:TextExtracts to be loaded. The description is generated when saving the page after an edit. $wgWikiSeoEnableAutoDescription = true;
$wgWikiSeoTryCleanAutoDescription Set to true, if WikiSEO should try to remove dangling sentences when using descriptions from textextracts. This will remove all characters after the last found dot. $wgWikiSeoTryCleanAutoDescription = true;
$wgWikiSeoOverwritePageImage Set to true to enable overwriting the iamge set by extension PageImages. $wgWikiSeoOverwritePageImage = true;
Social Media Images
$wgWikiSeoEnableSocialImages Generate dedicated social media icons for pages $wgWikiSeoEnableSocialImages = true;
$wgWikiSeoSocialImageIcon The icon/watermark to add to the social media image. Use a local file name $wgWikiSeoSocialImageIcon = LocalFile.jpg;
$wgWikiSeoSocialImageWidth Width of the social media image $wgWikiSeoSocialImageWidth = 1200;
$wgWikiSeoSocialImageHeight Height of the social media image $wgWikiSeoSocialImageHeight = 620;
$wgWikiSeoSocialImageTextColor Color of the text on the social image $wgWikiSeoSocialImageTextColor = #fff;
$wgWikiSeoSocialImageShowAuthor Show the author of the current page revision $wgWikiSeoSocialImageShowAuthor = true;
$wgWikiSeoSocialImageShowLogo Show the Wiki logo in the top right corner $wgWikiSeoSocialImageShowLogo = true;
$wgWikiSeoSocialImageBackgroundColor Default background color if no page image is found

Usage

The extension can be used via the {{#seo}} parser function or in Lua modules by using mw.ext.seo. It accepts the following named parameters in any order.

Tags related to the Open Graph protocol

Tags related to Open Graph type "article"

Tags related to Twitter Cards (see OpenGraph Tags)

Tags related to the Citation generator

Multiple authors should be separated by ;.

Tags related to the Dublin Core generator

Examples

Adding static values

Adding dynamic values

If you need to include variables or templates you should use the parser function to ensure they are properly parsed. This allows you to use Cargo or Semantic MediaWiki, with Page Forms, for data entry, or for programmatic creation of a page title from existing variables or content...

Using the lua module

WikiSEO exposes a lua method as mw.ext.seo.set

Example module:

The module would now be callable as {{#invoke:SEO|add|title=ExampleTitle|keywords=WikiSEO, SEO, MediaWiki}} or {{#invoke:SEO|addStatic}}.

Hreflang Attributes

Will generate the following <link> elements:

Title Modes

Example: Page with title Example Page

Append

HTML Title result: Example Page - Appended Title

Prepend

HTML Title result: Prepended Title - Example Page

Prepend (changed separator)

HTML Title result: Prepended Title >> Example Page

Replace (default)

HTML Title result: Replaced Title

Hooks

WikiSEO exposes Hooks that allow to customize the metadata that gets added to the page and saved in page props.

Migrating to v2

Removed tags

Removed aliases

Changed argument names

Known Issues

Extension:PageImages will add an og:image tag if an image is found on the page. This overwrites any og:image tag set using this extension.
There is currently no way to disable PageImages setting the meta tag.

Notes

If you only want to override the display title on pages (not append words to it), you might also look at the DISPLAYTITLE tag in combination with the Manual:$wgAllowDisplayTitle and Manual:$wgRestrictDisplayTitle settings.

schema.org

The SchemaOrg generator will set a SearchAction property based on Special:Search.
The properties publisher and author will be set to Organization with the name set to the content of $wgSitename.
dateModified will be automatically set by fetching the latest revision timestamp. If no published_time is set, datePublished will be set to the latest revision timestamp.

OpenGraph

article:modified_time will be automatically set by fetching the latest revision timestamp. If no published_time is set, article:published_time will be set to the latest revision timestamp.
This can be disabled on a per-page basis by setting modified_time=- through the parser.

Extending this extension

Metadata generators live in the includes/Generator/Plugins directory.
A generator has to implement the GeneratorInterface.
To load the generator simply add its name to $wgMetadataGenerators.


All versions of wiki-seo with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
ext-json Version *
composer/installers Version >=1.0.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package octfx/wiki-seo contains the following files

Loading the files please wait ....