{"id":19640584,"url":"https://github.com/daniel-km/omeka-s-module-cleanurl","last_synced_at":"2026-02-16T02:09:33.856Z","repository":{"id":59382992,"uuid":"87179754","full_name":"Daniel-KM/Omeka-S-module-CleanUrl","owner":"Daniel-KM","description":"Displays clean and readable URLs like https://example.org/my_collection/dcterms:identifier in Omeka S.","archived":false,"fork":false,"pushed_at":"2024-11-06T09:54:34.000Z","size":709,"stargazers_count":5,"open_issues_count":15,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-05T08:34:30.648Z","etag":null,"topics":["identifier","omeka-s","omeka-s-module","seo-friendly"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Daniel-KM.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-04T11:42:23.000Z","updated_at":"2024-11-06T09:54:38.000Z","dependencies_parsed_at":"2023-02-17T07:30:30.242Z","dependency_job_id":"33c0affd-4dd8-4765-b419-6a05600dc974","html_url":"https://github.com/Daniel-KM/Omeka-S-module-CleanUrl","commit_stats":null,"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daniel-KM%2FOmeka-S-module-CleanUrl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daniel-KM%2FOmeka-S-module-CleanUrl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daniel-KM%2FOmeka-S-module-CleanUrl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daniel-KM%2FOmeka-S-module-CleanUrl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Daniel-KM","download_url":"https://codeload.github.com/Daniel-KM/Omeka-S-module-CleanUrl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251304864,"owners_count":21567953,"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":["identifier","omeka-s","omeka-s-module","seo-friendly"],"created_at":"2024-11-11T14:06:12.027Z","updated_at":"2025-10-09T11:31:49.023Z","avatar_url":"https://github.com/Daniel-KM.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Clean Url (module for Omeka S)\n==============================\n\n\u003e __New versions of this module and support for Omeka S version 3.0 and above\n\u003e are available on [GitLab], which seems to respect users and privacy better\n\u003e than the previous repository.__\n\n[Clean Url] is a module for [Omeka S] that creates clean, readable and search\nengine optimized URLs like `https://example.com/my_item_set/dc:identifier`\ninstead of `https://example.com/item/internal_code`. Used identifiers come from\nstandard Dublin Core metadata, or from any specific field, so they are easy to\nmanage. It supports [Ark] and short urls too.\n\nFurthermore, it makes possible to use a main site and additional sites, like in\nOmeka Classic, so the main site won’t start with \"/s/site-slug\". The slug \"/page/\"\ncan be removed too, or replaced by something else. The urls from Omeka Classic\ncan be recreated easily too, so old urls can still be alive.\n\nThis [Omeka S] module was initially based on a rewrite of the [Clean Url plugin]\nfor [Omeka] and provide the same features as the original plugin and many more.\n\n\nInstallation\n------------\n\nSee general end user documentation for [installing a module].\n\nThis module requires the module [Common], that should be installed first.\n\n* From the zip\n\nDownload the last release [CleanUrl.zip] from the list of releases, and\nuncompress it in the `modules` directory.\n\n* From the source and for development\n\nIf the module was installed from the source, rename the name of the folder of\nthe module to `CleanUrl`.\n\nThen install it like any other Omeka module and follow the config instructions.\n\n**IMPORTANT**:\nThe module copies one file in the main config directory of Omeka, \"cleanurl.config.php\".\nthis is a list of all reserved words for the first level of the url, when\nthere are no site and page prefixes. All common routes are included. It is\nlarger than needed in order to manage future modules or improvments, according\nto existing modules in Omeka classic or Omeka S or common wishes.\nFurthermore, it contains the list of site slugs and some other settings in order\nto manage routing quickly, in particular when there are no site and page paths.\nContrary to a previous version, this file is automatically updated and should\nnot be updated manually.\n\n\nUsage\n-----\n\nClean urls are automatically displayed in public theme and they are not used in\nthe admin theme. They are case insensitive by default.\n\nThis module may be used with the module [Archive Repertory] to set similar paths\nfor real files (item_set_identifier / item_identifier / true_filename).\n\n**IMPORTANT**: In all cases, it is recommended to use unique identifiers through\nsites, pages, item, item set, media. and any other resources.\n\n### Main site\n\nIn some cases, Omeka S is used like in Omeka Classic, with a main site and some\nexhibits or decentralized sites (see [omeka/omeka-s#870]). In such cases, the\nprefix \"/s/site-slug\" is useless and not seo and user friendly. An option is\navailable in the config form to remove it.\n\n### Sites and pages\n\nOptions are available to replace or remove the `s/` and the `page/` in order to\nget these urls:\n\n    - / [ s/ ] :site-slug / [ page/ ] :page-slug\n    - / [ s/ ] :site-slug / :page-slug\n    - / :site-slug\n    - / :page-slug (for main site)\n\nOf course, be aware that some conflicts are possible in particular for pages,\neven if some slugs are reserved. A check is done when creating sites and pages\nto avoid issues.\n\n### Identifiers\n\nSimply set an identifier for each record in a field. The recommended field is\n`Dublin Core:Identifier`.\n\n- An identifier is always literal: it identifies a resource inside the base. It\n  can't be an external uri or a linked resource.\n- Identifiers can be any strings with any characters. Identifier are url-encoded\n  according to the standard, but it is recommended to avoid characters like \"%\"\n  or \"$\".\n- To use numbers as identifier is possible but not recommended, because they can\n  be confused with the internal id or resources. If so, it’s recommended that\n  all records have got an identifier.\n- A prefix can be added if you have other metadata in the same field.\n- A record can have multiple identifiers. The first one will be used to set the\n  default url. Other ones can be used to set alias.\n- If the same identifier is used for multiple records, only the first record can\n  be got. Currently, no check is done when duplicate identifiers are set.\n- Reserved words like \"item_sets\", \"items\", \"medias\", sites and simple pages\n  slugs...) should not be used as identifiers, except if there is a part before\n  them (a main path, a item set identifier or a generic word).\n- If not set, the identifier will be the default id of the record, except for\n  item sets, where the original path will be used.\n- If the path for the item contains the item set identifier, the first item set\n  will be used. If none, the urls will be the standard one.\n\n### Structure of urls\n\nThe configuration page let you choose the structure of paths for item sets,\nitems and files.\n\nEach resource can have a default path, a short path, and additional paths, or\nnot. Multiple urls can be set, in particular to have a permalink and a search\nengine optimized link. It is not recommended to multiply them.\n\nPaths are simple string where you can set the type of identifier you want\nbetween `{}`. Managed identifiers are:\n\n- `item_set_id`\n- `item_set_identifier`\n- `item_set_identifier_short`\n- `item_id`\n- `item_identifier`\n- `item_identifier_short`\n- `media_id`\n- `media_identifier`\n- `media_identifier_short`\n- `media_position`\n\nSo an example for a document within an item set may be `collection/{item_set_identifier}/{item_identifier}`.\n\nNote that if you choose to include the item set in the path, all items should\nhave an item set and all item set should have an identifier.\n\nThe identifier of the media can be the position. When used, it is recommended to\nspecify a format with a leading letter to avoid confusion with numeric media id,\nfor example `p{media_position}`. Furthermore, the position may not be stable: a\nscanned image may be missing. Finally, if the first media is not marked \"1\" in\nthe database or if the positions are not the good one, use module [Bulk Check]\nto fix them. Anyway, the identifier can be the content of any property, as long\nas its content is unique for the list of media of the item.\n\n### Config for Ark\n\nThe module [Ark] allows to create normalized unique identifiers formatted like\n`ark:/12025/b6KN`, where the \"12025\" is the id of the institution, that is\nassigned for free by the [California Digital Library] to any institution with\nhistorical or archival purposes. The \"b6KN\" is the short hash of the id, with a\ncontrol key. The name is always short, because four characters are enough to\ncreate more than ten millions of unique names.\n\nThere are multiple way to config arks:\n\n- With a prefix:\n  - Identifier prefix: `ark:/12345/`.\n  - Identifier are case sensitive: set true if you choose a format with a full\n    alphabet (uppercase and lowercase letters).\n  - Item:\n    - Path: `ark:/12345/{item_identifier_short}`.\n    - Pattern: `[a-zA-Z][a-zA-Z0-9]*`(or something else)\n  - Media: `ark:/12345/{item_identifier_short}/{media_id}`.\n- Without a prefix:\n  - Identifier are case sensitive: set true if you choose a format with a full\n    alphabet (uppercase and lowercase letters).\n  - Don't escape the slash `/`.\n  - Item:\n    - Path: `{item_identifier}`.\n    - Pattern: `[a-zA-Z][a-zA-Z0-9:/]*`(or something else, but with `:` and `/`)\n  - Media: `{item_identifier}/{media_id}`.\n\nOther options are at your convenience.\n\n### Config for Omeka Classic compatibility\n\nIf you upgraded from Omeka Classic and you want to keep a redirection from your\ncurrent urls:\n\n- skip main slug: `true`\n- item set path: `collections/show/{item_set_id}`.\n- item path: `items/show/{item_id}`.\n- media path: `files/show/{media_id}`.\n\n\nTODO\n----\n\n- [ ] Manage hierarchy of pages (/my-site/part-1/part-1.1/part-1.1.1).\n- [ ] Forward/Redirect to the canonical url\n- [x] Replace the check with/without space by a job that cleans all identifiers (see Bulk Check).\n- [ ] Remove the management of the space to get resources from identifiers with a prefix.\n- [ ] Improve speed to create url, in particular when creating urls in bulk (module Mapping). Create a table? Or even a single setting with the full list id/identifier?\n\n\nWarning\n-------\n\nUse it at your own risk.\n\nIt’s always recommended to backup your files and your databases and to check\nyour archives regularly so you can roll back if needed.\n\n\nTroubleshooting\n---------------\n\nSee online issues on the [module issues] page on GitLab.\n\n\nLicense\n-------\n\nThis module is published under the [CeCILL v2.1] license, compatible with\n[GNU/GPL] and approved by [FSF] and [OSI].\n\nIn consideration of access to the source code and the rights to copy, modify and\nredistribute granted by the license, users are provided only with a limited\nwarranty and the software’s author, the holder of the economic rights, and the\nsuccessive licensors only have limited liability.\n\nIn this respect, the risks associated with loading, using, modifying and/or\ndeveloping or reproducing the software by the user are brought to the user’s\nattention, given its Free Software status, which may make it complicated to use,\nwith the result that its use is reserved for developers and experienced\nprofessionals having in-depth computer knowledge. Users are therefore encouraged\nto load and test the suitability of the software as regards their requirements\nin conditions enabling the security of their systems and/or data to be ensured\nand, more generally, to use and operate it in the same conditions of security.\nThis Agreement may be freely reproduced and published, provided it is not\naltered, and that no provisions are either added or removed herefrom.\n\n\nCopyright\n---------\n\n* Copyright Daniel Berthereau, 2012-2024 (see [Daniel-KM] on GitLab)\n* Copyright BibLibre, 2016-2017\n\nFirst version of this plugin has been built for [École des Ponts ParisTech].\nThe upgrade for Omeka 2.0 has been built for [Mines ParisTech]. The upgrade for\nOmeka S was built by [BibLibre] for [Paris Sciences et Lettres (PSL)]. Then, the\nmodule was rewritten to manage various requirements.\n\n\n[Clean Url]: https://gitlab.com/Daniel-KM/Omeka-S-module-CleanUrl\n[Omeka S]: https://omeka.org/s\n[Clean Url plugin]: https://gitlab.com/Daniel-KM/Omeka-plugin-CleanUrl\n[Omeka]: https://omeka.org/classic\n[BibLibre]: https://github.com/biblibre\n[Ark]: https://gitlab.com/Daniel-KM/Omeka-S-module-Ark\n[Common]: https://gitlab.com/Daniel-KM/Omeka-S-module-Common\n[installing a module]: https://omeka.org/s/docs/user-manual/modules/#installing-modules\n[omeka/omeka-s#870]: https://github.com/omeka/omeka-s/issues/870\n[config/clean_url.config.php]: https://gitlab.com/Daniel-KM/Omeka-S-module-CleanUrl/blob/master/config/clean_url.config.php#L9\n[module issues]: https://gitlab.com/Daniel-KM/Omeka-S-module-CleanUrl/-/issues\n[Archive Repertory]: https://gitlab.com/Daniel-KM/Omeka-S-module-ArchiveRepertory\n[Bulk Check]: https://gitlab.com/Daniel-KM/Omeka-S-module-BulkCheck\n[CeCILL v2.1]: https://www.cecill.info/licences/Licence_CeCILL_V2.1-en.html\n[GNU/GPL]: https://www.gnu.org/licenses/gpl-3.0.html\n[FSF]: https://www.fsf.org\n[OSI]: http://opensource.org\n[École des Ponts ParisTech]: http://bibliotheque.enpc.fr\n[Mines ParisTech]: https://patrimoine.mines-paristech.fr\n[Paris Sciences et Lettres (PSL)]: https://bibnum.explore.univ-psl.fr\n[GitLab]: https://gitlab.com/Daniel-KM\n[Daniel-KM]: https://gitlab.com/Daniel-KM \"Daniel Berthereau\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniel-km%2Fomeka-s-module-cleanurl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaniel-km%2Fomeka-s-module-cleanurl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniel-km%2Fomeka-s-module-cleanurl/lists"}