You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A very common pitfall when serving TypeDoc documentation on GitHub Pages is getting 404 errors because of HTML file names that start with an underscore. Adding a .nojekyll file to your GitHub Pages root fixes this.
TypeDoc automatically clears your output folder, so your .nojekyll file will get removed. The best way to work around this is a custom package.json script that re-adds .nojekyll on every build:
Update the TypeDoc documentation to state that a .nojekyll file is necessary for your documentation site to work on GitHub Pages.
Add a githubPages boolean config option that defaults to true. When githubPages == true, TypeDoc adds a .nojekyll file in the root of your output directory.
I can submit a PR if none of the maintainers are eager to work on this.
The text was updated successfully, but these errors were encountered:
Is this still necessary with TypeDoc 0.21+? Most of the underscores in file names in 0.20 and earlier were from module names that were wrapped with quotes. In 0.21+ we don't do that anymore, though I guess it could still show up if using scoped package names... it won't hurt anything, so sounds like a reasonable thing to include. A PR would be great!
Search Terms
GitHub Pages, nojekyll, 404 error, page not found
Problem
A very common pitfall when serving TypeDoc documentation on GitHub Pages is getting 404 errors because of HTML file names that start with an underscore. Adding a
.nojekyll
file to your GitHub Pages root fixes this.TypeDoc automatically clears your output folder, so your
.nojekyll
file will get removed. The best way to work around this is a custompackage.json
script that re-adds.nojekyll
on every build:Suggested Solution
.nojekyll
file is necessary for your documentation site to work on GitHub Pages.githubPages
boolean config option that defaults to true. WhengithubPages == true
, TypeDoc adds a.nojekyll
file in the root of your output directory.I can submit a PR if none of the maintainers are eager to work on this.
The text was updated successfully, but these errors were encountered: