{"id":19675816,"url":"https://github.com/progerxp/textpub","last_synced_at":"2025-08-24T16:17:44.145Z","repository":{"id":3011556,"uuid":"4030639","full_name":"ProgerXP/TextPub","owner":"ProgerXP","description":"Text Publisher bundle for the Laravel PHP framework.","archived":false,"fork":false,"pushed_at":"2013-09-25T12:08:53.000Z","size":132,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-03T06:04:34.010Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://laravel.ru/bundles/textpub","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ProgerXP.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-04-15T08:03:58.000Z","updated_at":"2024-03-16T20:52:56.000Z","dependencies_parsed_at":"2022-08-26T03:01:36.405Z","dependency_job_id":null,"html_url":"https://github.com/ProgerXP/TextPub","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ProgerXP/TextPub","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProgerXP%2FTextPub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProgerXP%2FTextPub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProgerXP%2FTextPub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProgerXP%2FTextPub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ProgerXP","download_url":"https://codeload.github.com/ProgerXP/TextPub/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProgerXP%2FTextPub/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271901702,"owners_count":24841121,"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","status":"online","status_checked_at":"2025-08-24T02:00:11.135Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-11T17:26:00.497Z","updated_at":"2025-08-24T16:17:44.110Z","avatar_url":"https://github.com/ProgerXP.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Text Publisher\r\n\r\n**TextPub** is a flexible text serving interface. It works with **various formatters** which can be customized per page file extension; it supports **caching** and **custom 404 pages**.\r\n\r\nIt can also optionally reside under its own URL (bundle prefix set by **handles**) or under site's root serving specific URLs only.\r\n\r\n**TextPub** is used as a backend to serve [Laravel.ru](http://laravel.ru) documentation, articles and several standalone pages.\r\n\r\n[ [Bundle homepage](http://bundles.laravel.com/bundle/textpub) | [Russian](http://laravel.ru/bundles/textpub) ]\r\n\r\n## Installation\r\nAt first, fetch it with **Artisan**:\r\n\r\n```\r\nphp artisan bundle:install textpub\r\n```\r\n\r\nThen put this into your **application/bundles.php**:\r\n\r\n```PHP\r\n'textpub' =\u003e array(\r\n  'handles' =\u003e 'text',\r\n\r\n  'autoloads' =\u003e array(\r\n    'map' =\u003e array('TextPub' =\u003e '(:bundle)/api.php')\r\n  )\r\n)\r\n```\r\n\r\n\u003e Depending on your configuration (see below) you can also set **auto** and remove **handles**. However, the autoloader option should always be present.\r\n\r\n\u003e Default configuration allows serving of **txt**, **html** and **php** pages out of the box if they are located under _TextPub_'s `storage/` or `public`/ (there are more actually, see the *path* option below).\r\n\r\n## Configuration\r\nAll configuration is done in **textpub/config/general.php**; this file contains extensive descriptions so please refer there for the latest information.\r\n\r\nA brief overview of what you can customize follows.\r\n\r\n- **ext** sets which file extensions are served and how they are formatted\r\n- **formatter** specifies default formatter for those not listed in **ext**\r\n- **layout** sets the name of the view used to output formatted pages; by default it refers to the bare but complete XHTML view coming with _TextPub_ (`views/text.php`) - it can serve as an example and show which variables are always available\r\n- **index** sets the name of page to be served when a text directory is requested (without an explicit page name)\r\n- **cache** sets which page formats are cached and how\r\n- **debug** turns on logging of some debug info\r\n- **as** enables registration of the named routes for configured text pages\r\n- **single** tells that a specific page is a single page rather than a directory (group of pages)\r\n- **404** sets the page used to return 404 responses instead of Laravel default 404 handler\r\n- **paths** lists actually served pages - can be absent if **handles** is specified in the bindle configuration (see the _Installation_ section); if it's present it's an array of all options listed above overriding global options of the same name\r\n\r\n### Paths\r\nEach **paths** item can contain **path** option to specify where page file(s) is located physically.\r\n\r\nIf it's an **absolute** path `:bundle`, `:lang` and `:page` are replaced with the path to _TextPub_ root, current request language and requested page correspondingly\r\n\r\nIf it's **relative** _TextPub_ searches the page file in the following locations, returning the first it finds:\r\n\r\n1. :bundle/languages/:lang/:page\r\n1. :bundle/storage/:lang/:page\r\n1. :bundle/storage/:page\r\n1. :bundle/public/:lang/:page\r\n1. :bundle/public/:page\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprogerxp%2Ftextpub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprogerxp%2Ftextpub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprogerxp%2Ftextpub/lists"}