{"id":19398038,"url":"https://github.com/piedweb/linksimprover","last_synced_at":"2026-05-16T04:05:10.369Z","repository":{"id":57041404,"uuid":"316704636","full_name":"PiedWeb/LinksImprover","owner":"PiedWeb","description":"Improve the navigability of a website by improving your internal linking ... so Increase your search rankings","archived":false,"fork":false,"pushed_at":"2021-01-20T15:36:16.000Z","size":60,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-08T10:17:51.561Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://dev.piedweb.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PiedWeb.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null}},"created_at":"2020-11-28T10:04:23.000Z","updated_at":"2021-01-20T15:24:13.000Z","dependencies_parsed_at":"2022-08-23T23:31:11.957Z","dependency_job_id":null,"html_url":"https://github.com/PiedWeb/LinksImprover","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PiedWeb%2FLinksImprover","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PiedWeb%2FLinksImprover/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PiedWeb%2FLinksImprover/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PiedWeb%2FLinksImprover/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PiedWeb","download_url":"https://codeload.github.com/PiedWeb/LinksImprover/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240571029,"owners_count":19822412,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T11:04:43.701Z","updated_at":"2026-05-16T04:05:05.347Z","avatar_url":"https://github.com/PiedWeb.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003ca href=\"https://dev.piedweb.com\" rel=\"dofollow\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/PiedWeb/piedweb-devoluix-theme/master/src/img/logo_title.png\" width=\"200\" height=\"200\" alt=\"PHP Packages Open Source\" /\u003e\n\u003c/a\u003e\u003c/p\u003e\n\n# Links Improver\n\n**Improve the navigability of a website** by improving your internal linking\n... so **Increase your search rankings** (SEO).\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/piedweb/LinksImprover.svg?style=flat-square)](https://packagist.org/packages/piedweb/LinksImprover)\n[![GitHub Tests Action Status](https://img.shields.io/github/workflow/status/piedweb/LinksImprover/Tests?label=tests)](https://github.com/PiedWeb/LinksImprover/actions)\n[![Total Downloads](https://img.shields.io/packagist/dt/piedweb/LinksImprover.svg?style=flat-square)](https://packagist.org/packages/piedweb/LinksImprover)\n\n**You are not a developper and want a ready product like a wordpress plugin, see [Link Whisper](https://linkwhisper.com/ref/644/) (af link).**\n\n## Description\n\nFrom a list (raw or file) with this format :\n\n\u003e url,kws[separate by `,` and can use wildcard (`*`)],force (default 0),counter\n\n(force and counter are facultatives)\n\nThe code analyse a content to extrat existing links and word count.\n\nThen, from our list, it adds links to text from one kws suggested if :\n\n-   the kw is in the text (for sure) (en vérifiant que le précédent tag est un \u003cp.\\*\u003e),\n-   the link does not exist yet\n-   the number of link is not exceeded a number (eg: 10 links in the content) or a ratio (eg: 1 link for 50 words)\n\nThen update link counter\n\nIf you edit a second content, I advice you to `reOrder` the link list to permit link rotation (the just created links\nwill go at the end of the list respecting their `force` value if it's set).\n\n## Support this package\n\nBy speaking about and link `piedweb.com` on your website.\n\n## Usage\n\n### Installation\n\n```bash\ncomposer require piedweb/linksimprover\n```\n\n### Example\n\n```php\n\ninclude 'vendor/autoload.php';\n\nuse Piedweb\\LinksImprover\\LinksManager;\nuse Piedweb\\LinksImprover\\LinksImprover;\n\n$content = '\u003cp\u003eMy blog post content where I want to add few links to other page to get better pos on google.\u003c/p\u003e';\n\n$base = 'https://piedweb.com'; // my blog\n\n// Get your page you want increment the list and on wich kw\n$linksList = 'url,kws,force,counter\nhttps://piedweb.com/,\"Pied Web,Robin from Pied Web\"\nhttps://google.com/,\"Google,google.com\"';\n\n$linksManager = LinksManager::load($linksList, $base);\n\n$linksImprover = new LinksImprover($content);\n\n$newContent = $linksImprover-\u003eimprove($linksManager, 1 / 20, 'style=color:black'); // 1 link every 20 words max, it's huge :)\n\necho $newContent;\n\n// Then reorder link list before submit a new content\n\n$linksManager-\u003ereOrder();\n```\n\nWill return\n\n```html\n\u003cp\u003e\n    My blog post content where I want to add few links to other page to get\n    better pos on \u003ca href=\"https://google.com\" style=\"color:black\"\u003egoogle\u003c/a\u003e.\n\u003c/p\u003e\n```\n\nOther method\n\n```php\n// Go further\n/**\n * @param array\n */\n$linksImprover-\u003esetTagsInsideLinkCouldBeAdded(LinksImprover::TAGS_EXTENDED);\n// Per default, the links could be added in p, strong, b, em, i and span.\n// Extenged tags add div and h[2-6]\n// You can suggest an array\n\n// Reporting\n$linksImprover-\u003egetAddedLinksCount();\n$linksImprover-\u003egetAddedLinks();\n$linksImprover-\u003egetExistingLinks();\n\nclass:LinksImproverBBCode // Same api and search and replace for [url=*][/url]\n```\n\n### Warning (and benefit)\n\nIt don't compare link with or without host. So you can use it to link external website...\n\nbut be careful to ManageLinks with host and having a proper content (link without host).\n\n## Testing\n\n```bash\ncomposer test\n```\n\n## Credits\n\n-   Robin from [Pied Web](https://piedweb.com)\n-   [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiedweb%2Flinksimprover","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpiedweb%2Flinksimprover","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiedweb%2Flinksimprover/lists"}