{"id":21546248,"url":"https://github.com/8hobbies/typedoc-plugin-404","last_synced_at":"2026-02-10T09:10:19.719Z","repository":{"id":228469203,"uuid":"773686275","full_name":"8hobbies/typedoc-plugin-404","owner":"8hobbies","description":"Create a 404 Page for TypeDoc Generated Docs. Mirror of https://gitlab.com/8hobbies/typedoc-plugin-404","archived":false,"fork":false,"pushed_at":"2024-04-14T03:45:32.000Z","size":318,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-14T04:07:30.770Z","etag":null,"topics":["typedoc-plugin"],"latest_commit_sha":null,"homepage":"https://typedoc-404.8hob.io","language":"TypeScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/8hobbies.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-03-18T08:06:20.000Z","updated_at":"2024-04-15T23:29:39.191Z","dependencies_parsed_at":"2024-04-15T23:29:18.848Z","dependency_job_id":null,"html_url":"https://github.com/8hobbies/typedoc-plugin-404","commit_stats":null,"previous_names":["8hobbies/typedoc-plugin-404"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/8hobbies%2Ftypedoc-plugin-404","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/8hobbies%2Ftypedoc-plugin-404/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/8hobbies%2Ftypedoc-plugin-404/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/8hobbies%2Ftypedoc-plugin-404/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/8hobbies","download_url":"https://codeload.github.com/8hobbies/typedoc-plugin-404/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247713305,"owners_count":20983683,"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":["typedoc-plugin"],"created_at":"2024-11-24T06:09:31.139Z","updated_at":"2026-02-10T09:10:14.698Z","avatar_url":"https://github.com/8hobbies.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# typedoc-plugin-404: Create a 404 Page for TypeDoc Generated Docs\n\n[![npm version](https://badge.fury.io/js/@8hobbies%2Ftypedoc-plugin-404.svg)](https://badge.fury.io/js/@8hobbies%2Ftypedoc-plugin-404)\n[![pipeline status](https://gitlab.com/8hobbies/typedoc-plugin-404/badges/master/pipeline.svg)](https://gitlab.com/8hobbies/typedoc-plugin-404/-/commits/master)\n\n[GitLab](https://gitlab.com/8hobbies/typedoc-plugin-404) | [GitHub](https://github.com/8hobbies/typedoc-plugin-404)\n\nThis plugin generates a `404.html` at the root of the documents generated by\n[TypeDoc][]. `404.html` is a location for storing the 404 page that are\nrecognized by web hosts such as [GitHub Pages][] and [GitLab Pages][].\n\n## Install\n\n```\nnpm install --save-dev @8hobbies/typedoc-plugin-404\n```\n\n## Usage\n\nPass `--plugin @8hobbies/typedoc-plugin-404` when invoking the typedoc command:\n\n```\ntypedoc --plugin @8hobbies/typedoc-plugin-404\n```\n\nOr add the plugin to your `typedoc.json` file:\n\n```\n// typedoc.json\n{\n  \"plugin\": [\"@8hobbies/typedoc-plugin-404\"]\n}\n```\n\n## Configuration\n\nThis plugin recognizes a `page404Content` option in your `typedoc.json`. You can specify custom\ncontent that shows up in the 404 page:\n\n```json\n{\n  \"page404Content\": \"This page does not exist.\",\n  \"useHostedBaseUrlForAbsoluteLinks\": true\n}\n```\n\nThe default value is `\"404 Page Not Found\"`. The content can be HTML. The content is always wrapped\nwith `\"\u003cdiv class=\"404-content\"\u003e\u003c/div\u003e\"` in the HTML output.\n\n`\"useHostedBaseUrlForAbsoluteLinks\"` is required, otherwise user visiting non-existent pages in\nsubfolders will not retrieve the right asset paths.\n\nAlternatively, check out [this blog post][] for a detailed tutorial.\n\n### Use with TypeDoc 0.25.x\n\n\u003c!-- TODO Remove this subsection once TypeDoc 0.27.0 is released --\u003e\n\nTypeDoc by default uses relative asset paths. TypeDoc 0.25.x doesn't have the\n`useHostedBaseUrlForAbsoluteLinks` option, therefore, you will need to replace asset paths in\n404.html with absolute paths, otherwise user visiting non-existent pages in subfolders will not\nretrieve the right asset paths. For the default theme, this can be achieved by:\n\n1. Installing `replace-in-files-cli`:\n\n   ```shell\n   npm install --save-dev replace-in-files-cli\n   ```\n\n2. Run the replacement after `typedoc`. In your `package.json` file:\n\n   ```json\n   {\n     \"scripts\": {\n       \"doc\": \"typedoc \u0026\u0026 replace-in-files --string '=\\\"assets/' --replacement '=\\\"/assets/' docs/404.html\"\n     }\n   }\n   ```\n\n## Live Example\n\n[The document of this plugin](https://typedoc-404.8hob.io) itself is a live example.\nVisit [its 404 page](https://typedoc-404.8hob.io/404.html) or type in a random path from\nthat domain to check out.\n\n## Contributing\n\nSource code is available on [GitLab][].\n\nTo report a bug, visit the [issue tracker][].\n\nTo run test, run `npm run test-all`. To display test coverage, run `npm run coverage`. To build for\nproduction, run `npm pack`. To build the documentation, run `npm run doc`.\n\nTo send your contribution, open a [merge request][].\n\n## License\n\n```text\nCopyright 2024 8 Hobbies, LLC \u003chong@8hobbies.com\u003e\n\nLicensed under the Apache License, Version 2.0(the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\n[GitHub Pages]: https://docs.github.com/en/pages/getting-started-with-github-pages/creating-a-custom-404-page-for-your-github-pages-site\n[GitLab Pages]: https://docs.gitlab.com/ee/user/project/pages/introduction.html#custom-error-codes-pages\n[GitLab]: https://gitlab.com/8hobbies/typedoc-plugin-404\n[TypeDoc]: https://typedoc.org/\n[issue tracker]: https://gitlab.com/8hobbies/typedoc-plugin-404/issues\n[merge request]: https://gitlab.com/8hobbies/typedoc-plugin-404/-/merge_requests\n[this blog post]: https://8hob.io/posts/make-typedoc-generate-404-page/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F8hobbies%2Ftypedoc-plugin-404","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F8hobbies%2Ftypedoc-plugin-404","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F8hobbies%2Ftypedoc-plugin-404/lists"}