├── .nojekyll ├── 404.html ├── README.md ├── bar.json ├── folder-with-no-index └── bar.html ├── folder ├── baz.html └── index.html ├── folder2.html ├── folder2 └── index.html ├── foo.html ├── index.html └── json ├── bar.json ├── foo └── index.json └── index.json /.nojekyll: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /404.html: -------------------------------------------------------------------------------- 1 |

Custom 404 page

2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # playing-with-github-pages 2 | 3 | - https://simonw.github.io/playing-with-github-pages/ serves `index.html` 4 | - https://simonw.github.io/playing-with-github-pages/foo serves `foo.html` 5 | - https://simonw.github.io/playing-with-github-pages/foo.html serves `foo.html` 6 | - https://simonw.github.io/playing-with-github-pages/bar.json serves `bar.json` 7 | - https://simonw.github.io/playing-with-github-pages/bar serves a 404 (actually the custom `404.html` page) 8 | 9 | And in a `folder/`: 10 | 11 | - https://simonw.github.io/playing-with-github-pages/folder redirects to `/folder/` 12 | - https://simonw.github.io/playing-with-github-pages/folder/ serves `folder/index.html` 13 | - https://simonw.github.io/playing-with-github-pages/folder/index serves `folder/index.html` 14 | - https://simonw.github.io/playing-with-github-pages/folder/index.html serves `folder/index.html` 15 | - https://simonw.github.io/playing-with-github-pages/folder/baz serves `folder/baz.html` 16 | - https://simonw.github.io/playing-with-github-pages/folder/baz.html serves `folder/baz.html` 17 | 18 | I created `folder2.html` and `folder2/index.html`: 19 | 20 | - https://simonw.github.io/playing-with-github-pages/folder2 serves `folder2.html` (does not redirect) 21 | - https://simonw.github.io/playing-with-github-pages/folder2/ serves `folder2/index.html` 22 | - https://simonw.github.io/playing-with-github-pages/folder2/index serves `folder2/index.html` 23 | - https://simonw.github.io/playing-with-github-pages/folder2/index.html serves `folder2/index.html` 24 | 25 | I also created `folder-with-no-index/` without a `index.html` file: 26 | 27 | - https://simonw.github.io/playing-with-github-pages/folder-with-no-index redirects to `/folder-with-no-index/` 28 | - https://simonw.github.io/playing-with-github-pages/folder-with-no-index/ serves a 404 29 | 30 | `index.json` can act as an index page too: 31 | 32 | - https://simonw.github.io/playing-with-github-pages/json redirects to `/json/` 33 | - https://simonw.github.io/playing-with-github-pages/json/ serves `json/index.json` 34 | - https://simonw.github.io/playing-with-github-pages/json/index serves a 404 35 | - https://simonw.github.io/playing-with-github-pages/json/index.json serves `json/index.json` 36 | - https://simonw.github.io/playing-with-github-pages/json/bar serves a 404 37 | - https://simonw.github.io/playing-with-github-pages/json/bar.json serves `json/bar.json` 38 | - https://simonw.github.io/playing-with-github-pages/json/foo redirects to `/json/foo/` 39 | - https://simonw.github.io/playing-with-github-pages/json/foo/ serves `json/foo/index.json` 40 | 41 | The existence of the `.nojekyll` file causes GitHub Pages to publish the raw files without attempting to run Jekyll against them first. 42 | -------------------------------------------------------------------------------- /bar.json: -------------------------------------------------------------------------------- 1 | {"name": "bar.json"} 2 | -------------------------------------------------------------------------------- /folder-with-no-index/bar.html: -------------------------------------------------------------------------------- 1 |

folder-with-no-index/bar.html

2 | -------------------------------------------------------------------------------- /folder/baz.html: -------------------------------------------------------------------------------- 1 |

folder/baz.html

2 | -------------------------------------------------------------------------------- /folder/index.html: -------------------------------------------------------------------------------- 1 |

folder/index.html

2 | -------------------------------------------------------------------------------- /folder2.html: -------------------------------------------------------------------------------- 1 |

folder2.html

-------------------------------------------------------------------------------- /folder2/index.html: -------------------------------------------------------------------------------- 1 |

folder2/index.html

2 | -------------------------------------------------------------------------------- /foo.html: -------------------------------------------------------------------------------- 1 |

foo.html

2 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 |

index.html

2 | -------------------------------------------------------------------------------- /json/bar.json: -------------------------------------------------------------------------------- 1 | {"file": "json/bar.json"} 2 | -------------------------------------------------------------------------------- /json/foo/index.json: -------------------------------------------------------------------------------- 1 | {"file": "json/foo/index.json"} 2 | -------------------------------------------------------------------------------- /json/index.json: -------------------------------------------------------------------------------- 1 | {"file": "json/index.json"} 2 | --------------------------------------------------------------------------------