{"id":17035331,"url":"https://github.com/0xxb/slug","last_synced_at":"2026-01-22T22:02:41.968Z","repository":{"id":57081217,"uuid":"176704885","full_name":"0xxb/slug","owner":"0xxb","description":"SEO friendly URL structure.","archived":false,"fork":false,"pushed_at":"2019-03-21T02:45:02.000Z","size":7,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-14T13:55:22.297Z","etag":null,"topics":["php","seo","slug","translation","url","you-dao","youdao-fanyi-api"],"latest_commit_sha":null,"homepage":"","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/0xxb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-20T10:00:44.000Z","updated_at":"2019-08-14T13:46:15.000Z","dependencies_parsed_at":"2022-08-24T14:42:48.660Z","dependency_job_id":null,"html_url":"https://github.com/0xxb/slug","commit_stats":null,"previous_names":["0xxb/slug","wisp-x/slug"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/0xxb/slug","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xxb%2Fslug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xxb%2Fslug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xxb%2Fslug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xxb%2Fslug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xxb","download_url":"https://codeload.github.com/0xxb/slug/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xxb%2Fslug/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28672335,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T20:48:19.482Z","status":"ssl_error","status_checked_at":"2026-01-22T20:48:14.968Z","response_time":144,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["php","seo","slug","translation","url","you-dao","youdao-fanyi-api"],"created_at":"2024-10-14T08:46:31.792Z","updated_at":"2026-01-22T22:02:41.951Z","avatar_url":"https://github.com/0xxb.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Slug\n\n[![PHP](https://img.shields.io/badge/PHP-\u003e=5.6-orange.svg)](http://php.net)\n[![Total Downloads](https://poser.pugx.org/wispx/slug/downloads)](https://packagist.org/packages/wispx/slug)\n[![Latest Stable Version](https://poser.pugx.org/wispx/slug/version)](https://packagist.org/packages/wispx/slug)\n[![License](https://poser.pugx.org/wispx/slug/license)](https://packagist.org/packages/wispx/slug)\n\n\u003e 使用有道翻译实现的中文转英文、友好的、利于 SEO 的 URL 结构。\n\n## 开始\n\n注册有道智云：https://ai.youdao.com/?keyfrom=old-openapi\n\n注册之后，创建一个应用，然后你会得到下面两个配置信息:\n```\n1. appKey\n2. appSecret\n```\n\n## 安装\n\n通过下面的命令行来安装:\n\n```bash\ncomposer require wispx/slug\n```\n或者在你的 `composer.json` 文件中添加:\n\n```json\n\"wispx/slug\": \"~1.0\"\n```\n然后执行 `composer update`\n\n### 使用\n\n```php\n\u003c?php\n\n$config = [\n    'appKey' =\u003e 'your appKey',\n    'appSecret' =\u003e 'your appSecret'\n];\n\n$slug = new \\Slug\\Slug($config);\n\necho $slug-\u003etranslate('代码是艺术的一部分');\n// Code is part of the art\n\necho $slug-\u003etranslug('代码是艺术的一部分');\n// code-is-part-of-the-art\n\necho $slug-\u003etranslug('代码是艺术的一部分', '_');\n// code_is_part_of_the_art\n\n// Facade\n\\Slug\\Facade\\Slug::setConfig($config);\n\n// setConfig方法支持链式操作\n\\Slug\\Facade\\Slug::setConfig($config)-\u003etranslug('代码是艺术的一部分');\n// code-is-part-of-the-art\n\n// 还可以这样\n\\slug($config)-\u003etranslug('2333');\n// or\n\\slug()-\u003esetConfig($config)-\u003etranslug('2333');\n```\n\n### License\n\n- MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xxb%2Fslug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xxb%2Fslug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xxb%2Fslug/lists"}